P
PaulC
All I want to do is display today's date in 3 separate boxes for Day
Month and Year.
I have tried the following code to split the date into 3 strings:
Dim TodaysDate As Date
Dim strDate As String
Dim myDay As String
Dim myMonth As String
Dim myYear As String
TodaysDate = Format(Date, "dd/mm/yy")
strDate = CStr(TodaysDate)
myDay = Left(Cells(strDate, 1), 2)
myMonth = Mid(Cells(srtDate, 1), 4, 2)
myYear = Mid(Cells(srtDate, 1), 7, 2)
However, it says there is a type mismatch on the line:
myDay = Left(Cells(strDate, 1), 2).
There must be a simple solution but I can't find it.
Pau
Month and Year.
I have tried the following code to split the date into 3 strings:
Dim TodaysDate As Date
Dim strDate As String
Dim myDay As String
Dim myMonth As String
Dim myYear As String
TodaysDate = Format(Date, "dd/mm/yy")
strDate = CStr(TodaysDate)
myDay = Left(Cells(strDate, 1), 2)
myMonth = Mid(Cells(srtDate, 1), 4, 2)
myYear = Mid(Cells(srtDate, 1), 7, 2)
However, it says there is a type mismatch on the line:
myDay = Left(Cells(strDate, 1), 2).
There must be a simple solution but I can't find it.
Pau