pop up vs. data validation

  • Thread starter Thread starter carrera
  • Start date Start date
C

carrera

I have a reminder set up through data validation whenever certain cells are
clicked on.
I am seeing that some of the users are ignoring the reminder message, just
not noticing it next to the cell.

Is there a way to have a pop up warning/reminder come up whenever one of
these cells are click up, to which they will have to respond "ok" before
entering a number?

The number entered could be anywhere from .01 through 39.99
 
Because the issue is not what type of number is entered, but why.
The reminder message would say something like "Are you sure this is the
proper area to enter this number?"
 
To do what you are asking requires a macro that fires on the selection change
event. The following code pops a message box whenever cell a1 is selected.
right click the tab and select view code. Paste the following...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then
MsgBox "Are you sure you want to enter a number here?",
vbInformation, "???"
End If
End Sub
 
hmmmm.... it gives me the message compile error; syntax error when I pasted
your code. it does that when I click on Any cell on the sheet.

Also, how can I make it for a range of cells, let's say A1:E1?

do I just replace the $A$1 ?
 
The text wrapped when it posted... Try this...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If not intersect(Target, me.range("A1:E1")) is nothing Then
MsgBox "Are you sure you want to enter a number here?", _
vbInformation, "???"
End If
End Sub
 
WHOO HOO!

That worked brilliantly!

Thanks Jim.

Jim Thomlinson said:
The text wrapped when it posted... Try this...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If not intersect(Target, me.range("A1:E1")) is nothing Then
MsgBox "Are you sure you want to enter a number here?", _
vbInformation, "???"
End If
End Sub
 
Back
Top