Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Option Explicit I'm trying to enusure that all checkboxes are returned to unchecked when the workbook opens. All the boxes are on one sheet and were from the Forms menu. I was very kindly supplied with this code but it doesn't seem to be working on my workbook. I assume I'm doing something wrong but it's in the code sheet OK. Can anyone give me a pointer as to where I'm going wrong? Thanks Sub auto_open() Dim wks As Worksheet Dim OLEObj As OLEObject Set wks = Worksheets("sheet1") If wks.CheckBoxes.Count 0 Then wks.CheckBoxes.Value = xlOff End If For Each OLEObj In wks.OLEObjects If TypeOf OLEObj.Object Is MSForms.CheckBox Then OLEObj.Object.Value = False End If Next OLEObj End Sub -- Brisbane Rob ------------------------------------------------------------------------ Brisbane Rob's Profile: http://www.excelforum.com/member.php...o&userid=25096 View this thread: http://www.excelforum.com/showthread...hreadid=512611 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a way to add up check boxes | Excel Discussion (Misc queries) | |||
Filtering by Check Boxes | Excel Discussion (Misc queries) | |||
Can you sort with check boxes? | Excel Discussion (Misc queries) | |||
check boxes - copy | Excel Discussion (Misc queries) | |||
Check boxes - when one box is checked, I want a 2nd box to auto ch | Excel Discussion (Misc queries) |