Visual Basic

T

Todd

Hello,

How do you execute an outside sub procedure from an
existing sub procedure? i.e. If value = 5 Then run
sub "1", ElseIf value = 4 Then run sub "2".

Thanks for your help,
Todd
 
S

steve

Todd,

If value = 5 Then
Call sub1 ....

I have seen
Run sub1

My favorite is
Module1.Macro1
this identifies the module and the macro for easier trouble shooting.

It gets a little trickier if the sub is in another workbook, but it can be
done.
 
T

Todd

Steve,

Thank you very much. It worked!

Todd

-----Original Message-----
Todd,

If value = 5 Then
Call sub1 ....

I have seen
Run sub1

My favorite is
Module1.Macro1
this identifies the module and the macro for easier trouble shooting.

It gets a little trickier if the sub is in another workbook, but it can be
done.

--
sb



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top