【发布时间】:2017-03-30 10:23:26
【问题描述】:
我对 VBA 比较陌生,我需要一些关于我一直在编写的代码的帮助。目前,它看起来像这样:
Sub RoundedRectangle1_Click()
Selection.NumberFormat = "dd mmm yy"
Range("H2").ClearContents
Dim Date1 As ValueChange
Range("H2").Value = InputBox("Enter the first date (Monday) of the week you wish to view, in the format DD/MM")
End Sub
如您所见,我有一个弹出框供用户手动输入日期,但由于某种原因,一旦输入,它会一直以美国格式提供答案,例如,如果我输入 04 /12,这将显示为“12 Apr 16”,而不是“04 Dec 16”
【问题讨论】:
-
为什么不使用date picker?
-
写 04/12/16 会正确显示吗?
-
@Vityata 不幸的是这不起作用。
-
@SBF 我无法下载东西,因为这是一个工作项目,这将违反政策