Hi all,
Im using the code below to delete a range. What i would also like i
once the range has been deleted, if the user clicks the buttin again
an error message 'you have already deleted this range
appears....rather than a debug message.
How would i do this??
Cheers all!!!!
Private Sub CommandButton5_Click()
Dim rng As Range, x As Single
Dim wsquote As Worksheet
Set wsquote = Worksheets("sheet1")
Set rng = wsquote.Range("knife2")
x = rng.Rows.Count
wsquote.Range("knife2").ClearContents
rng.Offset(0, 0).Resize(x).EntireRow.Delete
'Sheets("sheet 1").Range("range").ClearContents
End Su
--
Message posted from
http://www.ExcelForum.com