I save a copy of the worksheet I am using w/ .SaveAs w/ a .txt file format.
This approach closes the original and keeps the newly saved copy open. I would prefer to keep the original open and close the newly created one.
Can I alter the existing code to instruct it not to close, inherent to .SaveAs, or put another line to open it back up?
[VBA]
Dim wbCUF As Workbook
Dim wsEC As Worksheet
Set wbCUF = Workbooks("Complete_Upload_File.xls")
Set wsEC = Worksheets("EC Products")
wbCUF.Save
wsEC.Activate
wsEC.Copy
Application.DisplayAlerts = False
With wsEC
.SaveAs Filename:="H:\8-27-06\My Documents\Excel\EC Excel Files\ecboardco uploaded files\Complete_Upload_File " & Format(Now, "m-dd-yy") & " @ " & Format(Now, "h_mm_ss am/pm") & ".txt", _
FileFormat:=xlTextMSDOS
End With
ActiveWindow.Close
Application.DisplayAlerts = True
End Sub
[/VBA]