Hi - you could use the this - replace the range A1:B2 with the cells you
want to delete
Sub Test()
Dim rng As Range
Dim var As Variant
Set rng = Range("A1:B2")
var = MsgBox("Are you sure you want to delete the following cells " _
& vbCr & vbCr & rng.Address, vbOKCancel + vbExclamation, _
"Delete Confirmation")
If var = vbOK Then
rng.ClearContents
End If
End Sub
"Anthony" wrote in message
...
Hi
I have a worksheet that contains several lines of data which I want the
user
to be able to clear using a macro, which is easy enough but before the
macro
actualy clears all the cells, is it possible to ask the user are they sure
??
any ideas ??
Thanks
Anthony
|