Message Box: Delete row x?
Option Explicit
Sub testme()
Dim resp As Long
resp = MsgBox(Prompt:="Are you sure you want to delete row " & ActiveCell.Row, _
Buttons:=vbYesNo)
If resp = vbYes Then
'unprotect the sheet
ActiveCell.EntireRow.Delete
'protect the sheet
End If
End Sub
Tami wrote:
i have a macro designed to allow a user to delete a row in a protected
worksheet.
In the message box, i'd like to prompt the user as follows:
"Are you sure you want to delete row x?" with X being the row number of
where the cursor is currently sitting.
thanks in advance,
tami
--
Dave Peterson
|