![]() |
|
|
|
#1
|
|||
|
|||
|
A tricky one - Script starting excel with macro
hello,
im trying to start excel with macro in it and than start the macro...i dont know what commands must i use in vbs to start excel than set "Enable macro" and for the cheery on top start the macro... ehhhmm...a little help woud be appreciated mucho... nice day everyone, Bojankus |
|
#2
|
||||
|
||||
|
I think that you can circumvent the problem altogether by signing your macro code, which will cause a macro to be executed automatically, without the security prompt. For more information, search in Excel's help for steps to digitally sign a macro project.
|
|
#3
|
|||
|
|||
|
'Code for running excel macro in vbs
Dim xlApp Dim xlWkb Set xlApp = CreateObject("excel.application") Set xlWkb = xlApp.Workbooks.Open("YOUR WORKBOOK") xlWkb.RunAutoMacros 1 'xlautoopen xlApp.Run ("YOUR MACRO") xlApp.Visible = True Set xlWkb = Nothing Set xlApp = Nothing More info here http://msdn.microsoft.com/library/de...HV05186508.asp Hope this helps |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|