Here is my logic.
Most people when writing code would write their code and put the code into a Module and then run the code and test it out several times. Then if all works well they may say I want this code to run when I open my workbook.
So instead of copying all the code from the module and put it into the Thisworkbook Open they would just go and put
Call and the name of their Macro.
Into Thisworkbook Open
Another example
Lets say I write some code and want to run the same code in 20 different buttons in my Workbook.
Do I want to copy all that code and put it into 20 different buttons. I would think not.
So if the name of my Macro is George
Then all I have to do is put:
Call George in all of those Buttons
And lets say next week I say I want to change my code a little.
And if My Macro is named George I go into the code and make the change
Now the next time a person presses a button with the Call George in it the Macro Named George runs
But if I put all the code into 20 different buttons and I decide I want to make a change to the code I would have to go into all 20 buttons and change the code.
Test it out and see if what I say is true.
Write some simple code in a Module
Lets say something like this:
Code:
Sub Good_Morning_World()
MsgBox "Today is Monday"
End Sub
OK when this Runs it will give you a Message Box Popup Which says "Today is Monday"
So now go put:
Call
Good_Morning_World
Into 10 different buttons in your Workbook
Now any time you press that buttons it's going to Give you a Popup message saying
"Today is Monday"
Ok now a week later your wife says I do not like that I think the message should say My Baby is Smart
So all you need to do is go back into The module script and change the Message to My Baby is Smart
You only have to do this in the Module script
But next time you click on any of those buttons your going to get a Message saying My Baby is Smart
Can you now see why sometimes it's just best to write some code in a Module and then call it from a button.