Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
End Of Month
How can I detect if the End Of the month has been reached
from within VBA I know you can use EOMONTH in Excel, is it available in VBA? Pete |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
End Of Month
Try this Pete
If Month(Date) < Month(Date + 1) Then MsgBox "This is the last day" -- Regards Ron de Bruin http://www.rondebruin.nl "Pete" wrote in message ... How can I detect if the End Of the month has been reached from within VBA I know you can use EOMONTH in Excel, is it available in VBA? Pete |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
End Of Month
"Pete" wrote in message ... How can I detect if the End Of the month has been reached from within VBA I know you can use EOMONTH in Excel, is it available in VBA? Pete Assuming you have a date in A1, you could use this formula =IF(A1=DATE(YEAR(A1),1+MONTH(A1),0), TRUE, FALSE) I got the idea from http://www.mrexcel.com/td0053.html /Fredrik |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
End Of Month
Hi,
If you want to verify that today is the end of the month If Day(Date+1) = 1 Then Msgbox "End of Month" Replace Date with any other variable, should you need to. Regards, Daniel M. "Pete" wrote in message ... How can I detect if the End Of the month has been reached from within VBA I know you can use EOMONTH in Excel, is it available in VBA? Pete |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
End Of Month
Monthend = Application.Run("ATPVBAEN.XLA!EOMONTH", Range("daterange").Value, 1) "Pete" wrote: How can I detect if the End Of the month has been reached from within VBA I know you can use EOMONTH in Excel, is it available in VBA? Pete |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
End Of Month
And if you set a reference to the ATP in the VBE (Tools/References, check
ATPVBA), you can write it as MonthEnd = EOMONTH(Range("DateRange").Value) On Fri, 25 Mar 2005 13:55:02 -0800, Stratuser wrote: Monthend = Application.Run("ATPVBAEN.XLA!EOMONTH", Range("daterange").Value, 1) "Pete" wrote: How can I detect if the End Of the month has been reached from within VBA I know you can use EOMONTH in Excel, is it available in VBA? Pete |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
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) | |||
Retrieve data for previous 3, 6, 12 month given current month | Excel Worksheet Functions | |||
Create Month Timetable on a worksheet different month each works | Excel Worksheet Functions | |||
transfer cell $ amount to other sheet month-to-month without overc | Excel Discussion (Misc queries) |