Hmmm I can’t find the best way to do this. Plus, this code doesn’t work anyway. I want the text of “January” (and all 12 months) returned with two variables:
If month = "January" Then
days = "31" And monthnum = "1"
End If
Suggestions?
Syntax that finally worked:
If month = "January" Then
days = 31
mon = 1
ElseIf month = "February" Then
days = 29
mon = 2
'elseif for the rest of the months
End If
Try this VBA syntext