Hello:
I have a worksheet I'm using in Excel 2007 and it has a lot of information users fill out. I've got most of the code working right, but I cannot seem to find any good information on how to reset a checkbox.
My code is:
Code:
Sub Reset_Button()
'
' Reset_Button Macro
' Turn off screen flicker
Application.ScreenUpdating = False
' Reset the Template
Worksheets("Template_Type").Visible = xlSheetVisible
Application.Goto Reference:="Template_Number"
Range("B2").Select
ActiveCell.FormulaR1C1 = "1"
Worksheets("Template_Type").Visible = xlSheetHidden
'Reset the Assets
Worksheets("Asset_Type").Visible = xlSheetVisible
Application.Goto Reference:="Asset_Type"
Range("B2").Select
ActiveCell.FormulaR1C1 = "1"
Range("B3").Select
ActiveCell.FormulaR1C1 = "1"
Range("B4").Select
ActiveCell.FormulaR1C1 = "1"
Range("B5").Select
ActiveCell.FormulaR1C1 = "1"
Range("B6").Select
ActiveCell.FormulaR1C1 = "1"
Range("B7").Select
ActiveCell.FormulaR1C1 = "1"
Range("B8").Select
ActiveCell.FormulaR1C1 = "1"
Range("B9").Select
ActiveCell.FormulaR1C1 = "1"
Range("B10").Select
ActiveCell.FormulaR1C1 = "1"
Range("B11").Select
ActiveCell.FormulaR1C1 = "1"
Range("B12").Select
ActiveCell.FormulaR1C1 = "1"
Range("B13").Select
ActiveCell.FormulaR1C1 = "1"
Range("B14").Select
ActiveCell.FormulaR1C1 = "1"
Range("B15").Select
ActiveCell.FormulaR1C1 = "1"
Range("B16").Select
ActiveCell.FormulaR1C1 = "1"
Range("B17").Select
Worksheets("Asset_Type").Visible = xlSheetHidden
' Return to Coversheet sheet
Sheets("Coversheet").Select
' Clean up rest of coversheet and reset values
Application.Goto "Filename"
Selection.Value = ""
Application.Goto "Golive"
Selection.Value = ""
Application.Goto "Hub_Sun"
Selection.Value = ""
Application.Goto "School"
Selection.Value = ""
Application.Goto "Unit_Phase_Title"
Selection.Value = ""
Application.Goto "Unit_Phase_Number"
Selection.Value = ""
Application.Goto "Mega_Title"
Selection.Value = ""
' Set it at Filename
Range("C2").Select
' Turn screen clicker back on.
Application.ScreenUpdating = True
End Sub
Right before the 'Set it at Filename comment, I need to reset to checkboxes to unchecked. Any help on this would be greatly appreciated. Also, I wouldn't complain if anyone had any thoughts on cleaning up the code either.
Thanks in advance for your help.
Arholly