Clear checkbox when workbook open advice

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,602
Office Version
  1. 2007
Platform
  1. Windows
I wish to clear either checkbox on sheet BIKES when a user opens a workbook.

On the BIKES sheet this works to clear checkbox for worksheet activate event

VBA Code:
Private Sub Worksheet_Activate()
   CheckBox1 = False
   CheckBox2 = False
End Sub

BUT it doesnt work for workbook open so please advise correct way.

VBA Code:
Private Sub Workbook_Open()
Application.EnableEvents = False
Sheets("BIKES") Checkbox1 = False
Sheets("BIKES") Checkbox2 = False
Application.EnableEvents = True
End Sub
 
Last edited by a moderator:

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
You need dots. Try this. Are your checkboxes ActiveX?
Rich (BB code):
Private Sub Workbook_Open()
Application.EnableEvents = False
Sheets("BIKES").Checkbox1 = False
Sheets("BIKES").Checkbox2 = False
Application.EnableEvents = True
End Sub
 
Upvote 0
Solution
Now sorted thanks all

VBA Code:
Private Sub Workbook_Open()
Application.EnableEvents = False
With Sheets("INV")
    .CheckBox1 = False
    .CheckBox2 = False
End With
Application.EnableEvents = True
End Sub
 
Upvote 0
Now sorted thanks all

The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top