Hope you enjoying you day / night (if your on the otherside of the globe).
I've got the
following code to save some open text files and need some help saving the files as .xls without renaming worksheets (or
losing any multiple sheets)
I wish to prompt the users to save the file to the location that they select (which
is working ok) with a generic name followed by date.
I want to save the files as excel which isn't quite working
as when you exit the file it will still prompt if you want to save changes - and if you click yes it will tell you that there
are features which are not supported by txt files. Also one workbook has mutliple sheets that I need to keep.
I can't get it to save the files without renaming the first worksheet in it.
The first worksheet in both files need to remain with the name Master - currently its renaming the sheet the same as the
(Next month the op file will become last months file and the macro will be looking for a worksheet named Master)
If anybody has any suggestions how I can do this it would be greatly appreciated.
P.S. I'm using excel 2002.
Dim strFilePrefix1 As String
Dim strFilePrefix2 As String
Dim strFilePrefix3 As String
'op File - text file which needs to be saved
strFilePrefix1 = ActiveCell.Value
'Mgmt File - text file which needs to be saved
strFilePrefix2 = ActiveCell.Value
'Last month - excel workbook which is closed without saving changes
strFilePrefix3 = ActiveCell.Value
Dim SaveMgmt As String
SaveMgmt = Application.GetSaveAsFilename("SAF Mgmt File" & Left(Date, 2) & Mid(Date, 4, 2) & Right(Date, 2) & ".xls", , ,
"Save the Mgmt File...")
Dim SaveOp As String
SaveOp = Application.GetSaveAsFilename("SAF Op File" & Left(Date, 2) & Mid(Date, 4, 2) & Right(Date, 2) & ".xls", , , "Save
the Operations File...")