P
Peter Rooney
I want to enter a header into a cell on a worksheet whcih contains text and
the current date. I have written a routine to generate the current date,
whcih works fine.
Sub GenTodaysDate()
Dim TodaysDate As String
TodaysDate = DateSerial(Year(ActiveProject.CurrentDate), _
Month(ActiveProject.CurrentDate), _
Day(ActiveProject.CurrentDate))
MsgBox (TodaysDate)
End Sub
But when I try to use the "TodaysDate" variable as part of entering a label,
all I get is the text part (i.e. Service Management Plan - ", with no date.
SetTaskField Field:="Name", Value:="Service Management Plan - " &
TodaysDate, TaskID:=1, ProjectName:="Proj22"
In Excel, I seem to remember using something like "format(date,"dd/mm/yy")
to achieve what i want - can anybody help?
Cheers
Pete
the current date. I have written a routine to generate the current date,
whcih works fine.
Sub GenTodaysDate()
Dim TodaysDate As String
TodaysDate = DateSerial(Year(ActiveProject.CurrentDate), _
Month(ActiveProject.CurrentDate), _
Day(ActiveProject.CurrentDate))
MsgBox (TodaysDate)
End Sub
But when I try to use the "TodaysDate" variable as part of entering a label,
all I get is the text part (i.e. Service Management Plan - ", with no date.
SetTaskField Field:="Name", Value:="Service Management Plan - " &
TodaysDate, TaskID:=1, ProjectName:="Proj22"
In Excel, I seem to remember using something like "format(date,"dd/mm/yy")
to achieve what i want - can anybody help?
Cheers
Pete