next
04-18-2012, 08:40 AM
I don't understand why it isn't working
Sub test()
Dim sheet As Worksheet
Dim today As Date
today = Format(Now, "mm-dd")
Debug.Print today
For Each sheet In ActiveWorkbook.Sheets
'Debug.Print sheet.Name
Next sheet
End Sub
Shouldn't the output be 04-18? Instead I'm getting 4/18/2012. What am I missing here?
Sub test()
Dim sheet As Worksheet
Dim today As Date
today = Format(Now, "mm-dd")
Debug.Print today
For Each sheet In ActiveWorkbook.Sheets
'Debug.Print sheet.Name
Next sheet
End Sub
Shouldn't the output be 04-18? Instead I'm getting 4/18/2012. What am I missing here?