magelan
09-26-2013, 08:53 AM
Is there something that breaks when you do a userform reload?
I've got a userform that I load up via pressing command button - does a userform.show
Inside userform.show i've got several buttons that display data from the worksheet and allow the user to delete, insert, etc, rows. So that my visible data is current, i execute the following code at the end of each command button's script
Call module1.reloadForm
...
sub reloadForm()
unload userform1
userform1.show
end sub
This seems to work great - except every now and then, whenever I use my buttons, i come up with "Code Execution Interrupted". Pressing the DEBUG button shoots me off to a completely random looking piece of code - it has rarely hit the same line twice.
What the heck causes this?
EDIT: I've actually commented out the lines of code that involve unloading and reloading the form and im STILL getting random code execution halts.
I've got a userform that I load up via pressing command button - does a userform.show
Inside userform.show i've got several buttons that display data from the worksheet and allow the user to delete, insert, etc, rows. So that my visible data is current, i execute the following code at the end of each command button's script
Call module1.reloadForm
...
sub reloadForm()
unload userform1
userform1.show
end sub
This seems to work great - except every now and then, whenever I use my buttons, i come up with "Code Execution Interrupted". Pressing the DEBUG button shoots me off to a completely random looking piece of code - it has rarely hit the same line twice.
What the heck causes this?
EDIT: I've actually commented out the lines of code that involve unloading and reloading the form and im STILL getting random code execution halts.