Hello,
I've been working on a new form an I'm at the point where I want to create a "Clear Form" button, which I do have working however there are certain cells that have formulas in them that I'd like to keep in there.
Right now the part that is failing is in bold:
Private Sub CommandButton1_Click()
Sheets("Supplier Request Form").Range("C15") = ""
Sheets("Supplier Request Form").Range("B16:B22") = ""
Sheets("Supplier Request Form").Range("G16:G19") = ""
Sheets("Supplier Request Form").Range("B24:B26") = "Select Option"
Sheets("Supplier Request Form").Range("G24:G26") = "Select Option"
Sheets("Supplier Request Form").Range("B28") = "Select Option"
Sheets("Supplier Request Form").Range("G28") = ""
Sheets("Supplier Request Form").Range("B32") = "Select Option"
Sheets("Supplier Request Form").Range("G32") = ""
Sheets("Supplier Request Form").Range("B34") = "Select Currency"
Sheets("Supplier Request Form").Range("G34") = "Select Freight Option"
Sheets("Supplier Request Form").Range("G37") = ""
Sheets("Supplier Request Form").Range("B39:B45").SpecialCells(xlCellTypeConstants).ClearContents
Sheets("Supplier Request Form").Range("G39:G41") = ""
Sheets("Supplier Request Form").Range("G46") = ""
Sheets("Supplier Request Form").Range("B48:B54") = ""
Sheets("Supplier Request Form").Range("B58:B59") = ""
Sheets("Supplier Request Form").Range("C61") = "Select Option"
Sheets("Supplier Request Form").Range("B66:B67") = "Select Option"
Sheets("Supplier Request Form").Range("G66") = "Select Option"
Sheets("Supplier Request Form").Range("B69") = ""
Sheets("Supplier Request Form").Range("E71:H71") = ""
Sheets("Supplier Request Form").Range("E74:H74") = ""
MsgBox "This form has been reset."
End Sub
Thanks for any help you can provide.
I've been working on a new form an I'm at the point where I want to create a "Clear Form" button, which I do have working however there are certain cells that have formulas in them that I'd like to keep in there.
Right now the part that is failing is in bold:
Private Sub CommandButton1_Click()
Sheets("Supplier Request Form").Range("C15") = ""
Sheets("Supplier Request Form").Range("B16:B22") = ""
Sheets("Supplier Request Form").Range("G16:G19") = ""
Sheets("Supplier Request Form").Range("B24:B26") = "Select Option"
Sheets("Supplier Request Form").Range("G24:G26") = "Select Option"
Sheets("Supplier Request Form").Range("B28") = "Select Option"
Sheets("Supplier Request Form").Range("G28") = ""
Sheets("Supplier Request Form").Range("B32") = "Select Option"
Sheets("Supplier Request Form").Range("G32") = ""
Sheets("Supplier Request Form").Range("B34") = "Select Currency"
Sheets("Supplier Request Form").Range("G34") = "Select Freight Option"
Sheets("Supplier Request Form").Range("G37") = ""
Sheets("Supplier Request Form").Range("B39:B45").SpecialCells(xlCellTypeConstants).ClearContents
Sheets("Supplier Request Form").Range("G39:G41") = ""
Sheets("Supplier Request Form").Range("G46") = ""
Sheets("Supplier Request Form").Range("B48:B54") = ""
Sheets("Supplier Request Form").Range("B58:B59") = ""
Sheets("Supplier Request Form").Range("C61") = "Select Option"
Sheets("Supplier Request Form").Range("B66:B67") = "Select Option"
Sheets("Supplier Request Form").Range("G66") = "Select Option"
Sheets("Supplier Request Form").Range("B69") = ""
Sheets("Supplier Request Form").Range("E71:H71") = ""
Sheets("Supplier Request Form").Range("E74:H74") = ""
MsgBox "This form has been reset."
End Sub
Thanks for any help you can provide.