LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default OnAction macro in another wb


Hi all,

I put some command bar code into my Add-In, The OnAction is to call a
Macro Named "aTest".
The twist is that the macro is not physically in the Add-In. It is in
various workbooks,
but the macro name is always "aTest"

I'm trying to call the macro with a variable (active workbook) &
"aTest".

some stuff tried:
With .Add(temporary:=True)
..Caption = "aTest"
'.OnAction = ThisWorkbook.Name & "!aTest"
'.OnAction = "ActiveWorkbook.Name" & "!aTest"
'.OnAction = ActiveWorkbook & "!aTest"
'.OnAction = "ActiveWorkbook.Name & '!aTest'"
'.OnAction = "!aTest"
'.OnAction = ActiveWorkbook.Name & ".xls" & "!aTest"
'.OnAction = "aTest"
End With

All the other code works fine,
and if i put the code into the same workbook as the macro it works fine
with:
'.OnAction = ThisWorkbook.Name & "!aTest"


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=567643

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro - onAction arguments version83 Excel Worksheet Functions 2 April 10th 10 09:59 PM
.onaction macro call won't work No Name Excel Programming 8 March 3rd 05 09:36 AM
.ONACTION macro call fails Wayne Excel Discussion (Misc queries) 2 March 2nd 05 05:10 PM
New menu item OnAction can't see macro? Ed Excel Programming 13 January 25th 05 11:27 PM
OnAction Cannot find Macro ?? Andrew Kennard Excel Programming 5 December 22nd 04 03:17 PM


All times are GMT +1. The time now is 04:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"