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: 13
Default Calling a public Macro from a Private Macro

Yet another question!!!

I am trying to use the Worksheet_change Event to call a macro that I have
placed in the "ThisWorkbook" folder using Application.run. The problem I am
having is that I do not want to use the specific name of the workbook in the
statement because it can change since I am making a "Template". Any
suggestions how I can call the Active workbook instead?!?! I have tried
several itterations and nothing seems to work. I keep getting application
failure. I assume it cannot find the macro....

Example:

Worksheet name - myworksheet
macro name - runme

Application.run "'myworksheet.xls'!ThisWorkbook.runme"

but replace "myworksheet.xls" with a generic statement

Thank you!
--
I am not where I intended to go, but I think I am where I am supposed to be!
 
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
difference between a private sub and a public function? Dave F Excel Discussion (Misc queries) 4 March 16th 07 07:38 PM
Calling a private macro Nick Smith[_2_] Excel Programming 5 June 8th 06 12:03 PM
Calling a private sub Bob Phillips[_7_] Excel Programming 3 July 29th 04 02:59 AM
public but private variables No Name Excel Programming 2 May 19th 04 12:41 PM
Public subroutine called from a private sub Neil Bhandar[_2_] Excel Programming 1 January 15th 04 10:23 PM


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