Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 237
Default Assigning Macro in another workbook

Hey

The below part of my code assigns the macro "ImportData"
to my menu item that I have created. I would like for it
to assign that macro "ImportData" but the macro is loacted
in Workbook ImportData. What is the code to make it
assign this macro from that workbook?


ctrlButton.OnAction = "ImportData"

Thank you

Todd Htutenstine
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Assigning Macro in another workbook

If the ImportData Workbook is closed:

..OnAction = "c:\my documents\excel\Importdata.xls" & "!module1.importdata"

(the module1. stuff is only required if you have non-unique procedure names in
different modules.)

and if it's open:
..OnAction = "importdata.xls!module1.importdata"



Todd Huttenstine wrote:

Hey

The below part of my code assigns the macro "ImportData"
to my menu item that I have created. I would like for it
to assign that macro "ImportData" but the macro is loacted
in Workbook ImportData. What is the code to make it
assign this macro from that workbook?

ctrlButton.OnAction = "ImportData"

Thank you

Todd Htutenstine


--

Dave Peterson

Reply
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
Excel Header & Footers in Templates - Assigning workbook specific DeePee Excel Discussion (Misc queries) 0 June 19th 08 05:52 PM
assigning macro carrera Excel Discussion (Misc queries) 16 March 21st 08 09:00 PM
Assigning Name to new workbook dan Excel Worksheet Functions 3 August 16th 06 05:13 PM
Assigning macro to a hyperlink Mantades Excel Worksheet Functions 0 June 9th 05 11:34 AM
Assigning Macro To Shape Tommi[_2_] Excel Programming 2 October 31st 03 10:58 AM


All times are GMT +1. The time now is 09:34 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"