Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Spot on. Thank you very much.
"Toppers" wrote: Ian, Look at VBA "DateAdd" function. Code from VBA help ... Dim FirstDate As Date ' Declare variables. Dim IntervalType As String Dim Number As Integer Dim Msg IntervalType = "m" ' "m" specifies months as interval. FirstDate = InputBox("Enter a date") Number = InputBox("Enter number of months to add") Msg = "New date: " & DateAdd(IntervalType, Number, FirstDate) MsgBox Msg HTH "IanC" wrote: I am looking to programmatically move a date forward or back by whole months (i.e. 3, 6, or 9) - the sort of process carried out by Edate if used in a formula. However, Edate doesn't seem to be available for use in VBA code. Am I missing something or is there a different way around this. Thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dates changing | Excel Discussion (Misc queries) | |||
Stop UK-style dates changing to US-style dates when mailmerging. | Excel Discussion (Misc queries) | |||
changing dates. | Excel Worksheet Functions | |||
Changing Dates | Excel Discussion (Misc queries) | |||
Changing Dates | Excel Discussion (Misc queries) |