View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default How do I create a popup notification in excel ?

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "C3:C40" '<=== change to suit

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If .Offset(0,3).Value = "PM Service" Then
If .Value 15000 Then
MsgBox "Time for an oil change"
End If
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

For multiple workbooks, you need to add to each.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Bear Hunter" wrote in message
...
OK, I want to monitor 2 ranges; F3:F40 , if any one of then = "PM Service"
then I want to use value in corresponding cell in range C3:C40, then add

set
value 15000, when value in Range C3:C40 reaches that total value I want a
popup reminder that it is "Time for an oil change". This will need to work
across multiple workbooks, I hope.
"Bob Phillips" wrote:

Tell us what cell you want to monitor, and what value will trigger the
popup.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Bear Hunter" wrote in message
...
Thanks Bob for your responce, but I don't know anything about working

with
code, just an novice with excel, don't know what values in the code to

change
to fit my needs. Thanks again, anyway.

"Bob Phillips" wrote:

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H10" '<=== change to suit

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If .Value 100 Then
MsgBox "Target reached"
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Bear Hunter" <Bear wrote in

message
...
I use an excel workbook to keep track of trips (mileage, stops,

fuel,
oil
changes, ect....). I want to creat a popup notification for oil

changes
that
monitors a range of cells and pops up when mileage is reached. I

created
the
workbook myself and always trying to improve it.