Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
First of the year
I have a macro that runs by a command buttom. I want it to check each time
to see if it's after the first of the year, then display a warning message and not display the messag again until it detects a new year oldjay |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
First of the year
Why not just look at the calendar?
-- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Oldjay" wrote in message I have a macro that runs by a command buttom. I want it to check each time to see if it's after the first of the year, then display a warning message and not display the messag again until it detects a new year oldjay |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
First of the year
Hi OldJay,
Try: '============= Private Sub CommandButton1_Click() On Error Resume Next If Evaluate("DateTrigger") < Year(Date) Then On Error GoTo 0 MsgBox "Year Change!" Names.Add Name:="DateTrigger", _ RefersTo:=Year(Date) End If 'your Code e.g.: MsgBox "Hi" End Sub '<<============= --- Regards, Norman "Oldjay" wrote in message ... I have a macro that runs by a command buttom. I want it to check each time to see if it's after the first of the year, then display a warning message and not display the messag again until it detects a new year oldjay |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
First of the year
People forget. That's why I need the code
"Jim Cone" wrote: Why not just look at the calendar? -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Oldjay" wrote in message I have a macro that runs by a command buttom. I want it to check each time to see if it's after the first of the year, then display a warning message and not display the messag again until it detects a new year oldjay |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
First of the year
Thanks
"Norman Jones" wrote: Hi OldJay, Try: '============= Private Sub CommandButton1_Click() On Error Resume Next If Evaluate("DateTrigger") < Year(Date) Then On Error GoTo 0 MsgBox "Year Change!" Names.Add Name:="DateTrigger", _ RefersTo:=Year(Date) End If 'your Code e.g.: MsgBox "Hi" End Sub '<<============= --- Regards, Norman "Oldjay" wrote in message ... I have a macro that runs by a command buttom. I want it to check each time to see if it's after the first of the year, then display a warning message and not display the messag again until it detects a new year oldjay |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
convert day of year to numeric value format year+day in 4 digits | Excel Worksheet Functions | |||
How do I crate a function for week of year + year in same cell. | Excel Worksheet Functions | |||
Combination Graph with current year and prior year sales | Charts and Charting in Excel | |||
trying to get day/month/year froamt while user enters year only | New Users to Excel | |||
How to compare current year to prior year in bar chart? | Charts and Charting in Excel |