2 replies
by david.keegan Accepted solution
by rtfentem Accepted solution
I had a similar problem and I created a Custom button on the template that I use to clear the cells on the form.
Here is the code...one gatcha, if any of your cells are merged, you must use the range of the field. You need to replace "Sales Invoice" with the sheet that you want to clear. Remember that the ranges are for my sheet so make sure that you change them before you try it.
Sub CommandButton2_Click()
' Code to clear cells of old data
Sheets("Sales Invoice").[B7:C7, B9:C9, E9:F9, B10:C10, E10:F10, F12, B13:D13, F13:G13, B14:D14, F14:G14, B15:D15, F15:G15].ClearContents
Sheets("Sales Invoice").[B16:D16, F16:G16, B17:D17, F17:G17, B18:D18, F18:G18, A21:G21, A23:G23, A27:F27, A28:F28, A29:F29, A30:F30, A31:F31, A32:F32, A33:F33, A34:F34, A35:F35, A36:F36, A37:F37, G39, G41].ClearContents
End Sub
Hope this helps
Rhonda
This discussion is closed to new replies.
Trending Hardware posts
Sort by Trending