ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   code to run another macro? (https://www.excelbanter.com/excel-programming/334330-code-run-another-macro.html)

short_n_curly[_17_]

code to run another macro?
 

i have a complexed macro for sheet activate programmed but yet want the
same macro to fire within another event it would be highly impractical
to simply cut and paste the code to another point within vba so is
there a code to trigger this event even though the sheet is already
activated?

i.e run.macro_worksheet active()

thanks in advance any help much apprechiated


--
short_n_curly
------------------------------------------------------------------------
short_n_curly's Profile: http://www.excelforum.com/member.php...o&userid=21576
View this thread: http://www.excelforum.com/showthread...hreadid=386611


Jim Thomlinson[_4_]

code to run another macro?
 
Change the sub declaration from private to public and you can call it like
any other procedure. Just make sure you reference the call with the sheet.
--
HTH...

Jim Thomlinson


"short_n_curly" wrote:


i have a complexed macro for sheet activate programmed but yet want the
same macro to fire within another event it would be highly impractical
to simply cut and paste the code to another point within vba so is
there a code to trigger this event even though the sheet is already
activated?

i.e run.macro_worksheet active()

thanks in advance any help much apprechiated


--
short_n_curly
------------------------------------------------------------------------
short_n_curly's Profile: http://www.excelforum.com/member.php...o&userid=21576
View this thread: http://www.excelforum.com/showthread...hreadid=386611




All times are GMT +1. The time now is 10:31 AM.

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