Link to home
Start Free TrialLog in
Avatar of bill201
bill201

asked on

how can i get with vba the curret month with two digits

hi


i'm trying this code

 MsgBox Format(Month(Now), "MM")

i want to get the month in two digits like this "06" but for some reason i get a msgbox with "01", why i don't get the right month?
ASKER CERTIFIED SOLUTION
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You only need
 MsgBox Format(Now, "MM")
Avatar of bill201
bill201

ASKER

thanks a lot