close

I assume there must be a way of unchecking all checkboxes on exit but I
can't find it. VBA code? Anyone know?

Thanks--
Brisbane Rob
------------------------------------------------------------------------
Brisbane Rob's Profile: www.excelforum.com/member.php...oamp;userid=25096
View this thread: www.excelforum.com/showthread...hreadid=512179I'd uncheck them the next time the workbook opens. It makes life easier.

Where are the checkboxes (on a single worksheet?)

How were they created (from the Forms toolbar or the control toolbox toolbar)

Option Explicit
Sub auto_open()
Dim wks As Worksheet
Dim OLEObj As OLEObject

Set wks = Worksheets(quot;sheet1quot;)

If wks.CheckBoxes.Count gt; 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 wrote:
gt;
gt; I assume there must be a way of unchecking all checkboxes on exit but I
gt; can't find it. VBA code? Anyone know?
gt;
gt; Thanks
gt;
gt; --
gt; Brisbane Rob
gt; ------------------------------------------------------------------------
gt; Brisbane Rob's Profile: www.excelforum.com/member.php...oamp;userid=25096
gt; View this thread: www.excelforum.com/showthread...hreadid=512179

--

Dave Peterson


Thanks very much apprecited--
Brisbane Rob
------------------------------------------------------------------------
Brisbane Rob's Profile: www.excelforum.com/member.php...oamp;userid=25096
View this thread: www.excelforum.com/showthread...hreadid=512179

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()