![]() |
end of month to 24th
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 |
end of month to 24th
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 |
end of month to 24th
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 |
end of month to 24th
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 |
end of month to 24th
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 |
end of month to 24th
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 |
All times are GMT +1. The time now is 05:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com