I have what should be a simple piece of VBA code to put together, but for the life of me i am hitting a brick wall. i am taking a VBA class but the prof is having us write code that isn't in the book or maybe we haven't covered yet.
i have a (form) button that needs to be used to toggle a single checkbox with in the same sheet. the checkbox applies a conditional formatting when selected.
This is the only code i have been able to get to work half-right. i realize it was meant for multiple check boxes but i tried to tailor it to a single.
Sub Hk()
Dim chkBox As Excel.CheckBox
Application.ScreenUpdating = False
For Each chkBox In ActiveSheet.CheckBoxes
chkBox.Value = xlOn
Next chkBox
Application.ScreenUpdating = True
End Sub
i still think there is something even simpler - using the form vs activex button
Thanx
i have a (form) button that needs to be used to toggle a single checkbox with in the same sheet. the checkbox applies a conditional formatting when selected.
This is the only code i have been able to get to work half-right. i realize it was meant for multiple check boxes but i tried to tailor it to a single.
Sub Hk()
Dim chkBox As Excel.CheckBox
Application.ScreenUpdating = False
For Each chkBox In ActiveSheet.CheckBoxes
chkBox.Value = xlOn
Next chkBox
Application.ScreenUpdating = True
End Sub
i still think there is something even simpler - using the form vs activex button
Thanx