ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro inside another macro? (https://www.excelbanter.com/excel-discussion-misc-queries/11047-macro-inside-another-macro.html)

thrava

Macro inside another macro?
 
I like to refer to another macro within another macro.

Is this possible?
Does this work?

sub macro1()
....
....

sub Macro2()
....
....
end sub

.....
.....
end sub
?


NeetYam

Yes this does work.



-----Original Message-----
I like to refer to another macro within another macro.

Is this possible?
Does this work?

sub macro1()
....
....

sub Macro2()
....
....
end sub

.....
.....
end sub
?

.


thrava

thank you


-----Original Message-----
Yes this does work.



-----Original Message-----
I like to refer to another macro within another macro.

Is this possible?
Does this work?

sub macro1()
....
....

sub Macro2()
....
....
end sub

.....
.....
end sub
?

.

.


Don Guillett

Not like that. You can have macro code within a macro or call another macro
sub macro1
call macro2
end sub

or
sub macro1
macro2 code here
end sub


--
Don Guillett
SalesAid Software

"thrava" wrote in message
...
I like to refer to another macro within another macro.

Is this possible?
Does this work?

sub macro1()
...
...

sub Macro2()
....
....
end sub

....
....
end sub
?





All times are GMT +1. The time now is 02:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com