We help IT Professionals succeed at work.

Resetting a "Check Box"

Bright01
Bright01 asked
on
EE Professionals,

I have two macros; One macro creates a set of tabs automatically, the other erases them and resets the model.  I'm using a check box (instead of a button) to activate the create tabs macro and a button to reset the model.  When I reset the model, the check box does not reset itself.  I think it's one or two lines of macro code that resets the check box but do not know how to do it.  Any help would be most appreciated.

B.
Comment
Watch Question

Can you post your file?
Commented:
Try this:
Sub resetCbx()

'If it is a form control called "Check Box 1"
Sheet1.Shapes("Check Box 1").Select
Selection.Value = xlOff

'if it is an activeX control called "CheckBox1"
Sheet1.CheckBox1 = False

End Sub

Open in new window


Good luck!

McOz

Author

Commented:
Here you go.  Just click the checkbox and it  creates tabs.  Hit the button and it resets but does not reset the check box.

Thank you!

 Test-Case-for-generating-tabs.xls

Author

Commented:
Thank you!  Simple, clear and most importantly.... it worked!

B.