Hi all,
I have used the site for some time to help with VBA issues in excel so first of all thanks to everyone!
Secondly I have an issue when using the "End" statment in my code
I have a Userform which is used to run multiple difference macros from. This Userform is designed to stay shown all the time.
There are a few macros which I have which call a "Checking" sub routine which checks the specified data. If any of the data appears to be unexpected then the macro warns the user then uses the "End" statement to stop the code.
All this works as expected and all the code works without erroring. My only problem is that when the "End" statment is used the Userform is also unloaded.
Is there another statement which can be used which will only stop the code and allow the userform to remain in view?
I would use "Exit Sub" but as you can see from the below hierachy the are instances where I would need to use it 3 times
Userform
'->Button Click
'->Call Macro x
'->Call Macro y
'->Call Checking
Any help on this would be greatly appreciated.
Thanks
James
I have used the site for some time to help with VBA issues in excel so first of all thanks to everyone!
Secondly I have an issue when using the "End" statment in my code
I have a Userform which is used to run multiple difference macros from. This Userform is designed to stay shown all the time.
There are a few macros which I have which call a "Checking" sub routine which checks the specified data. If any of the data appears to be unexpected then the macro warns the user then uses the "End" statement to stop the code.
All this works as expected and all the code works without erroring. My only problem is that when the "End" statment is used the Userform is also unloaded.
Is there another statement which can be used which will only stop the code and allow the userform to remain in view?
I would use "Exit Sub" but as you can see from the below hierachy the are instances where I would need to use it 3 times
Userform
'->Button Click
'->Call Macro x
'->Call Macro y
'->Call Checking
Any help on this would be greatly appreciated.
Thanks
James