Hi All
I have a code to save a specific sheet (Catan CSV) as a CSV file which over writes the same file every time. I need the code to prompt for a file name to be entered to save the Catan CSV sheet as, under the existing folder in the below code.
-----------------------------
Option Explicit
Public Sub ExportWorksheetAndSaveAsCSV()
Dim wbkExport As Workbook
Dim shtToExport As Worksheet
Set shtToExport = ThisWorkbook.Worksheets("Catan CSV")
Set wbkExport = Application.Workbooks.Add
shtToExport.Copy Before:=wbkExport.Worksheets(wbkExport.Worksheets.Count)
Application.DisplayAlerts = False
wbkExport.SaveAs Filename:="\\etwbms01\homes$\spope\My Documents\CVS Files\Roames Catan CSV.csv", FileFormat:=xlCSV
Application.DisplayAlerts = True
wbkExport.Close SaveChanges:=False
End Sub
Bookmarks