In order to fit my code, I needed to convert today's year to a two digit number (the last two digits). To test this, I tried:
Sub test() Dim y As String y = Format(Year(Now), "00") MsgBox (y) End Sub
I was told by a classmate that I could use the "Mid" function, but I'm not very familiar with VBA; any help?
Try:
y = Format(Date, "YY")
1.4m articles
1.4m replys
5 comments
56.9k users