![]() |
![]() |
|
|||||||
| 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: Feb 2002
Location: SRC
Posts: 165
|
Does anyone know how to call a macro that is in one workbook from another in Excel 2000
|
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
|
Quote:
-rh |
|
|
|
|
|
|
#3 | ||
|
Board Regular
Join Date: Feb 2002
Location: SRC
Posts: 165
|
I tried just typing the macro name in and got the error message that sub or function had not been created.
Quote:
|
||
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
|
Are both workbooks open? Also, how are you calling your functions? Can you post the code that you are calling FROM and the code that you are calling?
Thank you, -rh |
|
|
|
|
|
#5 | |
|
Board Regular
Join Date: Feb 2002
Location: SRC
Posts: 165
|
Both books are open
'Workbook "Test" Sub CallMacro() CallTestMacro End Sub 'Workbook "CallTest" Sub CallTestMacro() Msgbox "Routine called",VBOkOnly, Thisworkbook.name End Sub Quote:
|
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,064
|
Hi
Can you not use personal.xls ??? Thats what its for! Rdgs ========== Jack |
|
|
|
|
|
#7 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
How's about:
application.run("CallTestMacro") instead of "CallTestMacro" Cheers, Nate [ This Message was edited by: NateO on 2002-02-19 14:41 ] |
|
|
|
|
|
#8 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
|
Try this:
Application.Run ("CallTest.xls!CallTestMacro") -rh |
|
|
|
|
|
#9 | |
|
Board Regular
Join Date: Feb 2002
Location: SRC
Posts: 165
|
Thanks all it works now....If the workbook is found to be open the macro is called.
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|