Need warning message before a user changes worksheet
On 14/02/2012 8:26 AM, JG Scott wrote:
I have a worksheet called "Data". Anytime a user selects an entire
row I would like for a warning to appear that says "If you insert,
delete, or copy and insert rows in the top section, you must make the
same changes in the bottom section." Then, I want the user to be able
to click OK on the warning and proceed with whatever changes they
decide to make. The problem I have is how to keep the warning from
appearing again immediately when, for example, the user proceeds to
insert a row. Is there a timer I could use so the warning would not
occur again for some number of minutes?
Hi JG
Sub myWarning()
Dim WarnMess as integer
WarnMess = ("Danger Will Robinson, you are about to do something
monumentally Stupid! Are you sure you want to continue...", vbYesNo)
If WarnMess = vbNo then
Cancel = True
Else
'Do your thing here
End If
End Sub
|