嗯,我找不到最好的方法来做到这一点。另外,这段代码无论如何都不起作用。我希望返回带有两个变量的“一月”(以及所有 12 个月)的文本:
If month = "January" Then
days = "31" And monthnum = "1"
End If
建议?
最终奏效的语法:
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