简体   繁体   中英

Date on message box - VBA

I performed code below to show date on message box. However, the value in code is not the same with showing value on message box. Could you please help me to know the reason?

code VB:

Sub Button1_Click()
Dim birthday As Date
birthday = 27 / 11 / 1992 'dd/mm/yyy
abc = MsgBox("Birthday: " & Format(birthday, "dd/mm/yyyy"), 3, "Choose option")
End Sub

message box result

采用 :

 birthday = "27 / 11 / 1992"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM