![]() |
|
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 64
|
I am trying to have a macro in a particular file open another file and have it start a macro in that file. I can get it to open the file, but not get the macro to start. I have used RunAutoMacros w/ xlAutoOpen, but I either get errors or no macro running after the file opens.
|
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Try [untested] Application.Run "'Theworkbook.xls'!MacroName" Ivan |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 64
|
Still getting error 438:
Object doesn't support this property or method. Any other ideas |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
|
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Posts: 64
|
Using VBA in Excel 2000
In response to a command button on a form, the following code is executed: Workbooks.Open (FileName:=Path and file, Password:= password to open).Activate Application.Run "'workbook.xls'!macro" I tried this with "RunAutoMacos xlAutoOpen" in place of the "Activate", but still didn't get anywhere. |
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Private Sub CommandButton1_Click() Workbooks.Open Filename:="C:ExcelFilesUsefulVBA Get GUID.xls", password:="test" Application.Run "'VBA Get GUID.xls'!MoreReferenceWork" End Sub Ivan check your coding ?? |
|
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Mar 2002
Posts: 64
|
Could there be some switch in Excel that is blocking this? I am still getting the Run-time error 438"Object doesn't support this property or method"
|
|
|
|
|
|
#8 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi Fryer
If you are using the Auto_open (check out Workbook_open) you will need the "RunAutoMacros" Method Workbooks.Open (FileName:=Path and file, Password:= password to open) ActiveWorkbook.RunAutoMacros |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|