Hi Guys,
Can you help me in this problem. I have here a file and i need a clear button.
the Data starts at a6 and up to x6. Please see the image. and i need to clear starting from column A6 to x6 and down the rows. I used the code below but it doesnt seem to work. Hope you can help me.
Sub CLEAR2()
Dim rng As Range
Dim lr As Long
Dim varAnswer
lr = Cells(Rows.Count, 6).End(xlUp).Row
Set rng = Range("A6:X6" & lr)
varAnswer = MsgBox("Are you sure you want to delete these rows?", vbYesNo, "alert")
If varAnswer = vbYes Then
Range("B6").Select
Else
End If
End Sub
Capture.JPG
Bookmarks