|
-
Jan 25th, 2000, 03:05 PM
#1
Thread Starter
Lively Member
Hi,
How can I run a Macro in an Excel workbook?
I have this code, but I always get error 1004.
Who can help me?
R@emdonck
Sub DataToExcel()
Set xlsheet = GetObject("C:\WINNT40\Profiles\borbcf01\Desktop\Excel_Test.xls")
xlsheet.Application.Visible = True
xlsheet.Parent.Windows(1).Visible = True
xlsheet.Activate
xlsheet.Application.Run ("MyMacro")
xlsheet.Application.Quit
Set xlsheet = Nothing
End Sub
'run-time error '1004':
'The macro 'MyMacro' cannot be found.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|