Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
rcc rcc is offline
external usenet poster
 
Posts: 21
Default VB code for running a macro

Hi,

I'm trying to write a couple lines of code for a macro, call it Macro1. I
want Macro1 to be able to run Macro2. What's the code command for that?

Thanks,
rcc
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default VB code for running a macro


Sub Macro1
'somecode
Macro2
'optional additional code
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"rcc"
wrote in message
Hi,
I'm trying to write a couple lines of code for a macro, call it Macro1. I
want Macro1 to be able to run Macro2. What's the code command for that?
Thanks,
rcc
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default VB code for running a macro

Hi

Try
Sub Macro1()
your code

Call macro2

more code

End Sub


--

Regards
Roger Govier

"rcc" wrote in message
...
Hi,

I'm trying to write a couple lines of code for a macro, call it Macro1. I
want Macro1 to be able to run Macro2. What's the code command for that?

Thanks,
rcc


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default VB code for running a macro

call macro2

is one way.

rcc wrote:

Hi,

I'm trying to write a couple lines of code for a macro, call it Macro1. I
want Macro1 to be able to run Macro2. What's the code command for that?

Thanks,
rcc


--

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
Please Help Error 400 when running tested code Ditto Excel Discussion (Misc queries) 5 October 15th 07 01:24 PM
disable user running macro from Tools Macro Steve Simons Excel Discussion (Misc queries) 4 September 28th 06 06:28 AM
Automatically running code Richard Excel Worksheet Functions 1 February 7th 06 09:35 PM
Running code on a drop down selection change Steve Haack Excel Worksheet Functions 1 April 26th 05 05:03 AM
running code mark New Users to Excel 3 March 14th 05 09:14 AM


All times are GMT +1. The time now is 12:42 PM.

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

About Us

"It's about Microsoft Excel"