Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Am not a VBA power user but was wondering if someone could help. Does
anyone have code for opening a workbook(2) from another workbook(1) and then running a macro in workbook(2)? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In workbook(1) enter this in Thisworkbook module.
Edit for path and filename, of course. Private Sub Workbook_Open() Workbooks.Open Filename:= _ "C:\Program Files\Microsoft Office\Exceldata\12months.xls" End Sub In workbook(2) enter this in a general module Sub hoohah() msgbox "hello hoohah" End Sub In Thisworkbook module enter Private Sub Workbook_Open() hoohah End Sub Close and save both workbooks. Open workbook(1) and see what happens. Gord Dibben MS Excel MVP On Mon, 31 Aug 2009 14:56:18 -0700 (PDT), Gareth wrote: Am not a VBA power user but was wondering if someone could help. Does anyone have code for opening a workbook(2) from another workbook(1) and then running a macro in workbook(2)? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I call up a line of code that references a cell/range in theactive workbook workbook where I am running my macro from? | Excel Programming | |||
Running macro in another workbook | Excel Worksheet Functions | |||
Help:Running a macro in one excel workbook from another workbook | Setting up and Configuration of Excel | |||
Running a macro to protect a workbook on a already protected workbook UNprotects the workbook ?? | Excel Programming | |||
Running a macro in another workbook | Excel Programming |