Clear checkbox when workbook open advice

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,731
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

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
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,223,882
Messages
6,175,164
Members
452,615
Latest member
bogeys2birdies

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