ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check Box Help (https://www.excelbanter.com/excel-programming/284322-check-box-help.html)

pete

Check Box Help
 
Is it possible through code to uncheck "Check boxes". In
my code below I ask the User to uncheck the boxes that are
checked befor using again. But I would Like this to be
automatic. Is it Possible?

Range("Die1:Die5").Select
Selection.Copy
Range("NumSet").PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Range("Die1:Die5").Select
Selection.ClearContents
Range("E6").Select
MsgBox prompt:="Make sure to Clear check boxes!."
End Sub

Thanks for any help.
Pete W

[email protected]

Check Box Help
 
Here's some code from Tom Ogilvy that you might find appropriate.

http://www.google.com/groups?hl=en&l...%40cppssbbsa03

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------
Is it possible through code to uncheck "Check boxes". In
my code below I ask the User to uncheck the boxes that are
checked befor using again. But I would Like this to be
automatic. Is it Possible?

Range("Die1:Die5").Select
Selection.Copy
Range("NumSet").PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Range("Die1:Die5").Select
Selection.ClearContents
Range("E6").Select
MsgBox prompt:="Make sure to Clear check boxes!."
End Sub

Thanks for any help.
Pete W



Tom Ogilvy

Check Box Help
 
if they are from the control toolbox toolbar

for each obj in Activesheet.OleObjects
if typeof obj.Object is MSforms.CheckBox then
obj.Object.Value = False
end if
Next

if from the forms toolbar

for each chk in Activesheet.Checkboxes
chk.Value = xloff
Next

--
Regards,
Tom Ogilvy

"Pete" wrote in message
...
Is it possible through code to uncheck "Check boxes". In
my code below I ask the User to uncheck the boxes that are
checked befor using again. But I would Like this to be
automatic. Is it Possible?

Range("Die1:Die5").Select
Selection.Copy
Range("NumSet").PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Range("Die1:Die5").Select
Selection.ClearContents
Range("E6").Select
MsgBox prompt:="Make sure to Clear check boxes!."
End Sub

Thanks for any help.
Pete W





All times are GMT +1. The time now is 03:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com