I have a WB with several sheets of log data. The first column in each sheet is a date/time stamp. I created a macro on my “Main” page that will cycle through the data sheets & export each as their own workbook.
The first page exports the date/time stamp correctly, but all the other sheets export with just a date stamp. On those exported sheets/WB’s, if I change the format back to date/time it shows all the times as “0:00”.
Can you tell me what I’m missing?
The first page exports the date/time stamp correctly, but all the other sheets export with just a date stamp. On those exported sheets/WB’s, if I change the format back to date/time it shows all the times as “0:00”.
Can you tell me what I’m missing?
Code:
For Each ws In ThisWorkbook.Worksheets
OutputFile = "TrendData " & ws.Name & " " & StartMonth & StartDay & "-" & EndMonth & EndDay & ".xls"
If ws.Name <> "Main" Then
Sheets(ws.Name).Select
Sheets(ws.Name).Copy
ActiveWorkbook.SaveAs Filename:=WeekPath & OutputFile, _
FileFormat:=xlText, CreateBackup:=False
ActiveWorkbook.Close
ThisWorkbook.Activate
End If
Next