call or run a macro using concantenation
call or run a macro using concantenation
(OP)
This should be very simple... if you know what you're doing.
I just need to run a macro using the root of the name... Im_Dot_ and then add the number of the dot to the end of the name.
For example: I need to call the macro named Im_Dot_13.
The number 13 is derived by a loop of variables from 12 to 23. I designated this number as DotNum.
I've tried Application.Run ("Im_Dot_" & DotNum), but this doesn't work.
Either using Application.Run or Call... how would I run this macro? Thanks.
I just need to run a macro using the root of the name... Im_Dot_ and then add the number of the dot to the end of the name.
For example: I need to call the macro named Im_Dot_13.
The number 13 is derived by a loop of variables from 12 to 23. I designated this number as DotNum.
I've tried Application.Run ("Im_Dot_" & DotNum), but this doesn't work.
Either using Application.Run or Call... how would I run this macro? Thanks.
RE: call or run a macro using concantenation
Once that works, all you would need would be to point your existing action to the VB Script and send the proper DotNum.
I've got nothing to hide, and I demand that you justify what right you have to ask.
RE: call or run a macro using concantenation
CODE
Option Explicit Sub Im_Dot_12 ... End Sub Sub Im_Dot_13 ... End Sub ... etc. Sub Im_Dot_23 ... End Sub
Are these different macros with different code?
Or the code is the same and the only difference is your DotNum?
---- Andy
"Hmm...they have the internet on computers now"--Homer Simpson
RE: call or run a macro using concantenation
Why don't you explain what you need to do instead of how you think it should be done.
RE: call or run a macro using concantenation
In what sense?
RE: call or run a macro using concantenation
CODE --> VBA