i have no clue what i am doing. really. you have been warned.
i need to make a macro that will save a copy of the existing xls file as a csv file using user input for the name, but retaining a forced path and file type, and then closes everything without warnings
i have danced all around with varying results, but none to my exact specs...
Dim MyFile As String
Dim MyType As String
MyFile = ActiveWorkbook.Name
MyType = ".csv"
ChDir "C:\OPTI"
ActiveWorkbook.SaveAs Filename:="C:\OPTI\" & MyFile & MyType, FileFormat:=xlCSV, _
CreateBackup:=False
Application.DisplayAlerts = False
ActiveWorkbook.Close Savechanges:=False
Application.DisplayAlerts = True
anybody?
i need to make a macro that will save a copy of the existing xls file as a csv file using user input for the name, but retaining a forced path and file type, and then closes everything without warnings
i have danced all around with varying results, but none to my exact specs...
Dim MyFile As String
Dim MyType As String
MyFile = ActiveWorkbook.Name
MyType = ".csv"
ChDir "C:\OPTI"
ActiveWorkbook.SaveAs Filename:="C:\OPTI\" & MyFile & MyType, FileFormat:=xlCSV, _
CreateBackup:=False
Application.DisplayAlerts = False
ActiveWorkbook.Close Savechanges:=False
Application.DisplayAlerts = True
anybody?