Hi,
I have a test spreadsheet with a button control array, Events attached and a right-click context menu.
Clicking a checkbox (on or off doesn't matter) will delete any buttons present, recreate the 9 buttons as part of a control array and attach events. It also creates a right-click contextmenu (it runs twice to show no problems).
Once the checkbox has been clicked at least once, you can right-click any button, select "ReDo" and the same code will run again (twice - to illustrate the problem).
Only this time it will likely crash (if it doesn't right-click on a button and select ReDo again and it surely will).
In my actual project I need to be able to right click on one or more buttons so the crashing is bad news.
Why does it crash one way (context menu) and not the other (checkbox) as the same code is running (apart from creating the contextmenu)?
It's driving me crazy! Any ideas why and how to stop it?
Test spreadsheet attached in 97~2003 format, code below.
Thanks for your help.
Code in Worksheet called "Scenario":
Code in module called ProjectModule:
Code in event class called clsActiveXEvents:
Bookmarks