Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am running a app (SPSS) that does some Excel manipulations.
I have an Excel WOrkbook called macros.xls that opens up hidden whenever Excel is started. Running objExcel.App.Run "Macro" does not work while macros.xls is hidden. If I unhide macros.xls then the line does work. Is there a way to Run this macro without unhiding macros.xls every time? Lance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Visibility isn't a problem in xl2002.
This worked for me (started in MSWord): Option Explicit Sub testme01() Dim objExcel As Object Dim objWkbk As Object Set objExcel = CreateObject("excel.application") objExcel.Visible = True Set objWkbk = objExcel.workbooks.Open("C:\my documents\excel\macros.xls") objExcel.Run objWkbk.Name & "!macro" 'this worked, too: 'objExcel.Application.Run objWkbk.Name & "!macro" End Sub And my macros.xls was a hidden workbook. Lance Hoffmeyer wrote: I am running a app (SPSS) that does some Excel manipulations. I have an Excel WOrkbook called macros.xls that opens up hidden whenever Excel is started. Running objExcel.App.Run "Macro" does not work while macros.xls is hidden. If I unhide macros.xls then the line does work. Is there a way to Run this macro without unhiding macros.xls every time? Lance -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro running against hidden worksheet | Excel Discussion (Misc queries) | |||
VBA Macro cannot see hidden workbook | Excel Discussion (Misc queries) | |||
Help:Running a macro in one excel workbook from another workbook | Setting up and Configuration of Excel | |||
Running a macro in another workbook | Excel Programming | |||
Running a macro in another workbook | Excel Programming |