Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone please change this code to update the 24th of
each instead of thend? Thanks!!! Sub RefreshMeters() If Date = DateSerial(Year(Date), Month(Date) + 1, 0) Then MsgBox "This is the last day of the Month. Your data will be updated." ' RefreshMeters Macro ' Macro recorded 30/09/2003 by rhocarit ' ' Keyboard Shortcut: Ctrl+a ' ActiveWorkbook.RefreshAll Else MsgBox "This is NOT the last day of the Month. Your data has NOT been updated." End If End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rhonda
If Date = DateSerial(Year(Date), Month(Date) , 24) Regards Trevor "Rhonda" wrote in message ... Can someone please change this code to update the 24th of each instead of thend? Thanks!!! Sub RefreshMeters() If Date = DateSerial(Year(Date), Month(Date) + 1, 0) Then MsgBox "This is the last day of the Month. Your data will be updated." ' RefreshMeters Macro ' Macro recorded 30/09/2003 by rhocarit ' ' Keyboard Shortcut: Ctrl+a ' ActiveWorkbook.RefreshAll Else MsgBox "This is NOT the last day of the Month. Your data has NOT been updated." End If End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rhonda,
This returns the 24th MsgBox DateSerial(Year(Date), Month(Date) + 1, 24) -- sb "Rhonda" wrote in message ... Can someone please change this code to update the 24th of each instead of thend? Thanks!!! Sub RefreshMeters() If Date = DateSerial(Year(Date), Month(Date) + 1, 0) Then MsgBox "This is the last day of the Month. Your data will be updated." ' RefreshMeters Macro ' Macro recorded 30/09/2003 by rhocarit ' ' Keyboard Shortcut: Ctrl+a ' ActiveWorkbook.RefreshAll Else MsgBox "This is NOT the last day of the Month. Your data has NOT been updated." End If End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Steve
that's the 24th of next month. The previous formula calculates the last day of the current month. Regards Trevor "steve" wrote in message ... Rhonda, This returns the 24th MsgBox DateSerial(Year(Date), Month(Date) + 1, 24) -- sb "Rhonda" wrote in message ... Can someone please change this code to update the 24th of each instead of thend? Thanks!!! Sub RefreshMeters() If Date = DateSerial(Year(Date), Month(Date) + 1, 0) Then MsgBox "This is the last day of the Month. Your data will be updated." ' RefreshMeters Macro ' Macro recorded 30/09/2003 by rhocarit ' ' Keyboard Shortcut: Ctrl+a ' ActiveWorkbook.RefreshAll Else MsgBox "This is NOT the last day of the Month. Your data has NOT been updated." End If End Sub |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Trevor,
Thanks! I overlooked that 'nasty' '+ 1' -- sb "Trevor Shuttleworth" wrote in message ... Steve that's the 24th of next month. The previous formula calculates the last day of the current month. Regards Trevor "steve" wrote in message ... Rhonda, This returns the 24th MsgBox DateSerial(Year(Date), Month(Date) + 1, 24) -- sb "Rhonda" wrote in message ... Can someone please change this code to update the 24th of each instead of thend? Thanks!!! Sub RefreshMeters() If Date = DateSerial(Year(Date), Month(Date) + 1, 0) Then MsgBox "This is the last day of the Month. Your data will be updated." ' RefreshMeters Macro ' Macro recorded 30/09/2003 by rhocarit ' ' Keyboard Shortcut: Ctrl+a ' ActiveWorkbook.RefreshAll Else MsgBox "This is NOT the last day of the Month. Your data has NOT been updated." End If End Sub |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's what I wrote in September. Chrissy corrected it to the far simpler
IF Day(Date) = 24 THEN http://groups.google.com/groups?hl=e...4033409%40news. xtra.co.nz Now it's October. Do we have to do this EVEY month, Rhonda ? The function should work every month. -- HTH. Best wishes Harald Followup to newsgroup only please. "Trevor Shuttleworth" wrote in message ... Rhonda If Date = DateSerial(Year(Date), Month(Date) , 24) Regards Trevor "Rhonda" wrote in message ... Can someone please change this code to update the 24th of each instead of thend? Thanks!!! Sub RefreshMeters() If Date = DateSerial(Year(Date), Month(Date) + 1, 0) Then MsgBox "This is the last day of the Month. Your data will be updated." ' RefreshMeters Macro ' Macro recorded 30/09/2003 by rhocarit ' ' Keyboard Shortcut: Ctrl+a ' ActiveWorkbook.RefreshAll Else MsgBox "This is NOT the last day of the Month. Your data has NOT been updated." End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel to make the days cary over month to month automaticly | New Users to Excel | |||
Excel 2003 month to month data change grid | Excel Discussion (Misc queries) | |||
transfer cell $ amount to other sheet month-to-month without overc | Excel Discussion (Misc queries) | |||
from end of month to 24th of the month | Excel Programming | |||
Change end of month to 24th | Excel Programming |