Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default 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





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default 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









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel to make the days cary over month to month automaticly GARY New Users to Excel 1 April 19th 08 06:05 PM
Excel 2003 month to month data change grid Chad[_2_] Excel Discussion (Misc queries) 2 February 15th 08 01:36 AM
transfer cell $ amount to other sheet month-to-month without overc Colin2u Excel Discussion (Misc queries) 1 July 28th 05 02:36 AM
from end of month to 24th of the month Rhonda[_3_] Excel Programming 2 October 22nd 03 09:50 PM
Change end of month to 24th Rhonda[_2_] Excel Programming 2 September 30th 03 01:48 PM


All times are GMT +1. The time now is 12:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"