(Solved) – How to prevent VBA Delete Cell Range Run time error

(solved)-–-how-to-prevent-vba-delete-cell-range-run-time-error

I have created a very simple VBA function to delete the last set of data to be inputted into a form. For some reason this has started to bug and produce a

Runtime error of 1004

Can I check is this the best way to complete the task required or is there a better way as it has error-ed.

My code is as follows:

Sub Clealast_Click()

Worksheets("Holidays Form").Rows("b24:e24").Delete

End Sub

This works from a button on the page and is set to clear to selected range.

Leave a Reply

Your email address will not be published. Required fields are marked *