General Ledger
Active Member
- Joined
- Dec 31, 2007
- Messages
- 460
Dear All,
I am trying to create a macro that will:
I am at best a novice so please be detailed in any responses.
Thank you,
GL
I am trying to create a macro that will:
- Save data that was exported to Excel in a .xlsx file. The exported data could be xls, xlsx, csv, txt or tsv file format.
- Make that new .xlsx file the active workbook
- Close the file of exported data without saving
- It opens the File Save dialog and not the Save As dialog. I don't know if this is a problem.
- After execution, I am still looking at the exported file and not the .xlsx file that was saved.
- Is there a way in this macro to maximize the Save As dialog?
Code:
Dim strFolder As String
Filename = "Invoice Headers " & Format(Now, "yyyy-mm-dd hh mm") & ".xlsx"
With Application.FileDialog(msoFileDialogSaveAs)
.AllowMultiSelect = False
.InitialFileName = "Z:\Excel\" & Filename
.InitialView = msoFileDialogViewDetails
If .Show = -1 Then strFolder = .SelectedItems(1) Else Exit Sub
End With
I am at best a novice so please be detailed in any responses.
Thank you,
GL