-
Solved: Understanding Modules
Is there any advantage or disadvantage to having multiple modules or can I throw the VBA code for multiple subroutines into one module and record a macro as necessary from the code within the module.
(Hope that makes sense)
Also, I have two macros (using a button to activate each of them) that work perfectly but I'm having a hard time getting one button to operate both. Am I missing something?
-
Have multiple modules. There are two major advantages, it allows you to organise your code more logically, and it avoids running up against the 64Kb module size limit.
Call one from within the other
[vba]
Sub Macro1() 'assign this to the button
... some code
call Macro2
End Sub
Sub Macro2()
... some more code
End Sub
[/vba]
-
ah...placement is everything...finally tinkered around with it long enough and got it to work.
And thanks for the info on modules...appreciate the help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules