View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] pieterklinker@gmail.com is offline
external usenet poster
 
Posts: 3
Default how to execute a macro assigned to a checkbox in vba

Dave,

you are right, and i would not use this in production code.
However, the code is called from a workbook that i use to test another
workbook. In these tests i explicitly select a particular sheet and
then 'check' a checkbox on that sheet.
I test for succesfull execution of selecting the sheet, and also i have
a check in the 'check ckeckbox' code to test whether the name provided
for the checkbox is valid.

If despite these tests i should happen do something illegal i actually
want the code to crash so i can improve the testing or tested workbook.
Especcially the testing workbook is a work in progress (besides being a
test itself).

thanks for your comments,

Pieter