Reset Sheet

T

Todd

I have code such as the following linked to a command
button that when the checkboxes are selected and the
command button pressed it will turn the appropriate range
of cells yellow. I would like to have an additional
button that when pressed will reset the form back to the
original view where the checkboxes are not selected and
the range of cells are white which is the color they begin
as. Any help on this is greatly appreciated. Thanks!

Public Sub Seasonal()
Sheets("Form").Visible = True
If Worksheets("Index").CheckBox15.Value = False Then Exit
Sub
Sheets("Form").Activate
ActiveSheet.Range("Seasonal").Select
Selection.Interior.ColorIndex = 6


End Sub
 
D

Dave Peterson

This may get you started.

Public Sub Seasonal_off()
dim OLEObj as oleobject

with worksheets("form")
.visible = xlsheethidden ''''or xlsheetvisible
for each oleobj in .oleobjects
if typeof oleobj.object is msforms.checkbox then
oleobj.object.value = false
end if
next oleobj
.range("seasonal").interior.colorindex = xlnone
end with

End Sub
 
Top