Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
This works, but it works with any entry I put in column c, It doesn't wait
till the value in column c is + 15000. It works if "PM Service" is entered first in col "F" With any number above 15000 entered In corresponding col "C". Col "C" is odometer readings and I trying to be reminded when a "PM Service" is due. I really want to thank you for your help, I have gotten further than I would have on my on, but I have to go to work now. I'll check back in a few days. Thanks again. "Bob Phillips" wrote: 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. |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() "Bear Hunter" wrote in message ... This works, but it works with any entry I put in column c, It doesn't wait till the value in column c is + 15000. It works if "PM Service" is entered first in col "F" With any number above 15000 entered In corresponding col "C". Those two statements seem contradictory to me. One says it works in all instances, one says it works only in defined instances. |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Col. C Col.F
240500 PM Service 248000 Next Stop 255500 Need Popup at this point "this is a very basic example" "Bob Phillips" wrote: "Bear Hunter" wrote in message ... This works, but it works with any entry I put in column c, It doesn't wait till the value in column c is + 15000. It works if "PM Service" is entered first in col "F" With any number above 15000 entered In corresponding col "C". Those two statements seem contradictory to me. One says it works in all instances, one says it works only in defined instances. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is it possible to create a mailing list in excel, not importing d. | New Users to Excel | |||
create excel based standalone application | Excel Discussion (Misc queries) | |||
how to create the formula "cumsum" in excel | Excel Worksheet Functions | |||
Create database in excel? | New Users to Excel | |||
create price list from excel sheet | Excel Discussion (Misc queries) |