Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default CORRECT SYNTAX FOR RUN...

Hi,

I've been trying to solve this problem for a few days now. What is the
correct
syntax for Run, when executing a sub procedure in a DIFFERENT workbook
under the following conditions: the procedure has arguments, and you
are passing the code to run the macro with its arguments as 1 string:

sub RunMacro(STRING)

Application. Run STRING

End Sub

Where STRING has a value like "FILE.XLS!MACRO ARG1, ARG2"

Thanks for any help you can give

Regards,

Ian

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default CORRECT SYNTAX FOR RUN...


Ian, i'm not entirely sure what it is your trying to do if all you wan
to do is run a macro you just call it like Call RunMacro. I created
macro called Test1 and put this line in the Worksheet SelectionChang
event (just cos i'm lazy) Application.Run ("Test1"), so when i selecte
a new cell it run the macro.....it worked fine.

Regards,
Simo

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=57321

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default CORRECT SYNTAX FOR RUN...


Perhaps something like this?

Application.Workbooks.Open ("C:\Documents an
Settings\Simon\Desktop\test.xls")
With Workbooks("test.xls")
Application.Run ("Macro1")
End Wit

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=57321

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
Correct Syntax TeeSee Excel Discussion (Misc queries) 6 February 28th 08 01:36 AM
Correct Syntax Ronbo Excel Programming 2 February 21st 06 01:57 PM
Correct VBA syntax Ken G. Excel Discussion (Misc queries) 3 December 7th 05 12:35 AM
If...and... - can never get the syntax correct! Darin Kramer Excel Programming 12 March 24th 05 04:18 PM
Can't get this syntax correct, please help. Sharlene England Excel Programming 4 December 1st 03 05:41 PM


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