Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello -
I am a VBA rookie and am trying to write an Excel Macro which will clear contents of a cell along with any check boxes and option buttons. I got the first part of the macro correct, but when I tried adding additional checkboxes and options to it, it just don't work. Here is my code: Private Sub CommandButton1_Click() Dim cell As Range For Each cell In ActiveSheet.UsedRange If cell.Locked = False Then cell.MergeArea.ClearContents If OptionButton1.Value = 0 Then OptionButton1.ClearContents If CheckBox1.Value = 0 Then CheckBox1.ClearContents Next End Sub Thanks for any help someone can provide. Dan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Clearing cells without clearing formulas | Excel Discussion (Misc queries) | |||
Clearing cells | Excel Programming | |||
Array for clearing checkboxes | Excel Programming | |||
Excel VBA Problem - Clearing multiple checkboxes | Excel Programming | |||
Clearing cells | Excel Programming |