Hi,
Actually I'm using this code, to save a specific worksheet in CSV, on a predefined folder path, with this code the user can add the name for the file and it will be saved on the predefined path : here is on the desktop
I want to use dialog box (Save as) predefined on CSV format, sorry i'm new to vba i don't know how to use dialog box to save one particular sheet on csv when the user use that macro.
I need some help
Actually I'm using this code, to save a specific worksheet in CSV, on a predefined folder path, with this code the user can add the name for the file and it will be saved on the predefined path : here is on the desktop
VBA Code:
Public Sub Save_CSV()
Application.ScreenUpdating = False
Sheets("DATA_SHEET").Select
Dim N_fold As Variant
Dim Stock_N As String
On Error GoTo Canceled
N_fold = InputBox("Your file will be saved on the desktop.", "Save in CSV", "add a name to the file")
If StrPtr(N_fold) = 0 Then Exit Sub
Stock_N = N_fichier
With ActiveSheet
.Copy
ActiveWorkbook.SaveAs "C:\Users\Johnny\Desktop\" & Stock_N & "_" & .Name & ".csv", xlCSV, Local:=True
ActiveWorkbook.Close False
.Activate
End With
Canceled:
Application.ScreenUpdating = True
End Sub
I want to use dialog box (Save as) predefined on CSV format, sorry i'm new to vba i don't know how to use dialog box to save one particular sheet on csv when the user use that macro.
I need some help