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: 181
Default Syntax to Run Macro in ActiveWorkbook

Hi All

I have a macro that copies a sheet containing another macro to the
ActiveWorkbook.

I need to update the OnAction command of a shape to run the macro attached
to the new sheet. I can get it working using absolute values, but need to
change the workbook part to ActiveWorkbook -- but can't suss out the syntax.

Here's the absolute line:
ActiveSheet.Shapes("myShp").OnAction = _
"'my file name.xls'!TheNewMacroName"

I need something like this:
ActiveSheet.Shapes("myShp").OnAction = _
ActiveWorkbook.name!TheNewMacroName

TIA
Trevor Williams
 
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
help with macro syntax Steve Excel Discussion (Misc queries) 2 February 10th 09 06:59 PM
Error When using ActiveWorkBook.SaveAs and EnableEvents in same macro Anthony[_4_] Excel Programming 1 July 16th 07 02:32 AM
Macro for importing a fixed width text file into the activeworkbook Koveras Excel Programming 5 November 22nd 06 12:46 PM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
Not apply macro to every worksheet in activeworkbook G Setting up and Configuration of Excel 2 November 28th 05 05:36 PM


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

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"