Home |
Search |
Today's Posts |
#1
Posted to comp.databases.ms-access,microsoft.public.excel.programming
|
|||
|
|||
access 97 to excel 97: execute macro automation
Assuming macro1 is a vba macro rather than a Excel4 style macro on an Excel4
macro sheet change this line appExcel.ExecuteExcel4Macro "Macro1" to appExcel.Run "macro-test.xls!Macro1" Regards, Tom Ogilvy JMCN wrote in message om... hello i am trying to open an excel worksheet and excute a macro. i am able to launch excel but i cannot execute the macro(s). why? what did i leave out? should i create a getobject function? suggestions would be appreciated:) thanks jung here is the code. Public Sub LaunchExcel() Dim appExcel As Excel.Application, strwks As String Set appExcel = CreateObject("Excel.Application") Msg "Excel is running" appExcel.Visible = True strwks = "c:\Program Files\Microsoft Office\Office\" strwks = strwks & "macro-test.xls" appExcel.ExecuteExcel4Macro "Macro1" Set appExcel = Nothing End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
FIX: Annoying inconsistent errors in Excel via Access automation | Excel Discussion (Misc queries) | |||
Automation to Excel from Access | Excel Discussion (Misc queries) | |||
Running Access-to-Excel Automation.... | Excel Discussion (Misc queries) | |||
automation from access into excel | Excel Discussion (Misc queries) | |||
how do i password protect an .xls file? how do i unlock it for automation. e.g. want to unlock and access a .xls from another .xls macro. | Excel Worksheet Functions |