可以这么写:Sub Macro1()Dim dt As Datedt = Format(Date, "yyyy-mm-dd")MsgBox dtEnd Sub
Sub s() MsgBox DateEnd Sub