I am creating a quote form that has a check box for sales tax. On sheet1 the tax has a check box and sheet2 has a line for the sales tax included, which only shows if the check box is clicked. My code works when I test it (if I am on sheet2 viewing) UNTIL I enable the macro for the check box on sheet1. Then it throws a 400 error on the last line of either the unhide or hide code, depending on if box is checked or not. Any suggestions?
Sub CheckBox1_Click()
If Sheet1.Range("T17").Value = "True" Then
Call Unhide
ElseIf Sheet1.Range("T17").Value = "False" Then
Call Hide
Else
Return
End If
End Sub
Sub Unhide()
Sheet2.Range("A37:H37").Select
Selection.NumberFormat = "General"
End Sub
Sub Hide()
Sheet2.Range("A37:H37").Select
Selection.NumberFormat = ";;;"
End Sub
Sub CheckBox1_Click()
If Sheet1.Range("T17").Value = "True" Then
Call Unhide
ElseIf Sheet1.Range("T17").Value = "False" Then
Call Hide
Else
Return
End If
End Sub
Sub Unhide()
Sheet2.Range("A37:H37").Select
Selection.NumberFormat = "General"
End Sub
Sub Hide()
Sheet2.Range("A37:H37").Select
Selection.NumberFormat = ";;;"
End Sub