Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Thu, 7 Aug 2008 09:59:01 -0700,    group: microsoft.public.word.vba.beginners        back       


Recording Macros   
Hello-
Can anyone explain how to record a macro. I went to Help and followed the 
instructions, but it does not work. I am using a Command Button to try and 
open a spreadsheet then put it in a module.
Thanks!

-- 
Denise Payne
WPB  FL
date: Thu, 7 Aug 2008 09:59:01 -0700   author:   Denise Payne

Re: Recording Macros   
Is this in Word or Excel?  If the latter, it would be better to post to 
microsoft.public.excel.programming.

Aside from that, you should explain exactly what you want to achieve.  What 
exactly do you mean by "putting a spreadsheet into a module"?

-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Denise Payne"  wrote in message 
news:AD258A37-CB74-4A04-A494-9821CF71351F@microsoft.com...
> Hello-
> Can anyone explain how to record a macro. I went to Help and followed the
> instructions, but it does not work. I am using a Command Button to try and
> open a spreadsheet then put it in a module.
> Thanks!
>
> -- 
> Denise Payne
> WPB  FL
date: Fri, 8 Aug 2008 05:33:51 +1000   author:   Doug Robbins - Word MVP

Re: Recording Macros   
I am using Excel.
What I am trying to do is use a Command Button to link to a macro that will 
open a speadsheet from another file(Spreadsheet 1), then update another 
spreadsheet(Spreadsheet 2) from the first spreadsheet. Then, close 
everything. It is modeling data and there are 4323 rows and 50 columns. I am 
trying to create a command on one spreadsheet that will update the data at 
the touch of a button. 
-- 
Denise Payne


"Doug Robbins - Word MVP" wrote:

> Is this in Word or Excel?  If the latter, it would be better to post to 
> microsoft.public.excel.programming.
> 
> Aside from that, you should explain exactly what you want to achieve.  What 
> exactly do you mean by "putting a spreadsheet into a module"?
> 
> -- 
> Hope this helps.
> 
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
> 
> Doug Robbins - Word MVP
> 
> "Denise Payne"  wrote in message 
> news:AD258A37-CB74-4A04-A494-9821CF71351F@microsoft.com...
> > Hello-
> > Can anyone explain how to record a macro. I went to Help and followed the
> > instructions, but it does not work. I am using a Command Button to try and
> > open a spreadsheet then put it in a module.
> > Thanks!
> >
> > -- 
> > Denise Payne
> > WPB  FL 
> 
> 
>
date: Thu, 7 Aug 2008 13:16:01 -0700   author:   Denise Payne

Re: Recording Macros   
This forum is for Word vba - Excel has its own programming forums.

-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Denise Payne wrote:
> I am using Excel.
> What I am trying to do is use a Command Button to link to a macro
> that will open a speadsheet from another file(Spreadsheet 1), then
> update another spreadsheet(Spreadsheet 2) from the first spreadsheet.
> Then, close everything. It is modeling data and there are 4323 rows
> and 50 columns. I am trying to create a command on one spreadsheet
> that will update the data at the touch of a button.
>
>> Is this in Word or Excel?  If the latter, it would be better to post
>> to microsoft.public.excel.programming.
>>
>> Aside from that, you should explain exactly what you want to
>> achieve.  What exactly do you mean by "putting a spreadsheet into a
>> module"?
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "Denise Payne"  wrote in message
>> news:AD258A37-CB74-4A04-A494-9821CF71351F@microsoft.com...
>>> Hello-
>>> Can anyone explain how to record a macro. I went to Help and
>>> followed the instructions, but it does not work. I am using a
>>> Command Button to try and open a spreadsheet then put it in a
>>> module.
>>> Thanks!
>>>
>>> --
>>> Denise Payne
>>> WPB  FL
date: Fri, 8 Aug 2008 08:48:26 +0300   author:   Graham Mayor

Re: Recording Macros   
Hi Denise,

You should really have posted this in an NG like microsoft.public.excel.programming, but here's some code you could use. It includes 
a variety of error checks before trying to open the file:
Option Explicit
Dim wbFullName As String

Function IsLocked(wbFullName As String) As Boolean
On Error Resume Next
Open wbFullName For Binary Access Read Write Lock Read Write As #1
Close #1
IsFileOpen = Err.Number
Err.Clear
End Function

Sub OpenWorkbook()
Dim wbName As String
Dim wbPath As String
wbPath = "c:\data\"
wbName = "test.xls"
wbFullName = wbPath & wbName
If Dir(wbFullName) = "" Then
  MsgBox "Cannot find: " & wbFullName
ElseIf Not Workbooks(wbName) Is Nothing Then
  MsgBox "The file: " & wbFullName & " is already open!"
ElseIf IsLocked(wbFullName) Then
  MsgBox "The file: " & wbFullName & " is in use by another user!"
Else
  Workbooks.Open wbFullName
End If
End Sub

Simply change the path & filename to suit your needs.

-- 
Cheers
macropod
[MVP - Microsoft Word]


"Denise Payne"  wrote in message news:23B85C57-0834-4360-9F97-2A03B354E83E@microsoft.com...
>I am using Excel.
> What I am trying to do is use a Command Button to link to a macro that will
> open a speadsheet from another file(Spreadsheet 1), then update another
> spreadsheet(Spreadsheet 2) from the first spreadsheet. Then, close
> everything. It is modeling data and there are 4323 rows and 50 columns. I am
> trying to create a command on one spreadsheet that will update the data at
> the touch of a button.
> -- 
> Denise Payne
>
>
> "Doug Robbins - Word MVP" wrote:
>
>> Is this in Word or Excel?  If the latter, it would be better to post to
>> microsoft.public.excel.programming.
>>
>> Aside from that, you should explain exactly what you want to achieve.  What
>> exactly do you mean by "putting a spreadsheet into a module"?
>>
>> -- 
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "Denise Payne"  wrote in message
>> news:AD258A37-CB74-4A04-A494-9821CF71351F@microsoft.com...
>> > Hello-
>> > Can anyone explain how to record a macro. I went to Help and followed the
>> > instructions, but it does not work. I am using a Command Button to try and
>> > open a spreadsheet then put it in a module.
>> > Thanks!
>> >
>> > -- 
>> > Denise Payne
>> > WPB  FL
>>
>>
>>
date: Sat, 9 Aug 2008 19:56:43 +1000   author:   macropod lid

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us