arskiracer
New Member
- Joined
- Apr 3, 2013
- Messages
- 18
Hello, I'm attempting to have a checkbox option in a userform that will allow the macro to execute without requiring the user to click the "Run" button to continue. I'm having a hard time making the code jump from the end of the "UserForm_Initialize()" sub into the "RunButton_Click()" sub, where it would normally go once the user clicked on the run button.
Does anyone know how to make this happen?
After some Google searches, I tried the following code inside the userform_initialize section (at the very end) without success:
RunButton_Click
SettingsForm.RunButton_Click
Call SettingsForm.RunButton_Click
'these two together:
RunButton = True
RunButton = vbClick
I don't get any errors from any of this, it just doesn't seem to do anything. [correction: I do get an error on SettingsForm.RunButton_Click for some reason]
I never intended to have this macro run automatically, so I put a lot of code in the "RunButton_Click()" area in order to save userform data for future macro executions (and I don't want to redo that code), but now I'm repurposing this for something else and would like the option to have it run automatically without user interaction.
Does anyone know how to make this happen?
After some Google searches, I tried the following code inside the userform_initialize section (at the very end) without success:
RunButton_Click
SettingsForm.RunButton_Click
Call SettingsForm.RunButton_Click
'these two together:
RunButton = True
RunButton = vbClick
I don't get any errors from any of this, it just doesn't seem to do anything. [correction: I do get an error on SettingsForm.RunButton_Click for some reason]
I never intended to have this macro run automatically, so I put a lot of code in the "RunButton_Click()" area in order to save userform data for future macro executions (and I don't want to redo that code), but now I'm repurposing this for something else and would like the option to have it run automatically without user interaction.
Last edited: