#1
|
|||
|
|||
Using Save As in VBA gives problem with file type.
I have the code below to save the current file as an .xlsx file, but when I try to re-open the file, I get a file type error. It appears to be saving the document as an .xlsx file but it truly is staying in the .csv file type which was originally downloaded which Excel cannot access.
What I ultimately want is to have the document changed from .csv to .xlsx file type in a user defined location with the given file name and the date. The date is available in the file and is the day prior to the current date. Example: Trial save mm.dd.yyyy The date needed is located in cell E5 of the document. Dim path As Variant path = Application.GetSaveAsFilename( _ Title:="Select a File Location", _ InitialFileName:="Trial save", _ FileFilter:="Excel Files, *.xlsx, Macro Enabled Workbook, *.xlsm") If path = False Then MsgBox "No Loction Selected!", 16 Else ActiveWorkbook.SaveAs path End If |
Tags |
excel vba, vba save_as |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Save As new file type | LBruce | Word VBA | 12 | 09-30-2019 06:31 AM |
save file problem with win 10 | wilg | Windows | 4 | 08-24-2016 11:56 AM |
Word 2007 , when I save a .doc or .docx file the file type is showing "Empty" | Tomc29 | Word | 9 | 06-10-2015 03:04 AM |
Excel 2013, Problem with a shared file, takes long time to load and save and loads missing data | PStark | Excel | 0 | 12-04-2014 07:52 AM |
Set File Type when clicking Save As | Madbags | Word VBA | 1 | 10-10-2014 01:07 PM |