Hello,
The goal is to export an excel tab into a .csv fyle type, and then user can save this .csv file type with a name they choose. If this is not possible, then is there an automatic way to same to .csv file type based on file name that exporting tab came from? I have watched many videos but I got my head spinning. Any help is greatly appreciated.
I am in need of your help with below vba. I am able to export tab with ease.
However, I want to be able to export it as .csv file type. Is there a vba code that allows me to export as .csv excel file type? If no, then is there a way to export and automatic save as .csv file type on a desktop folder?
Private Sub CommandButton1_Click()
Sheets("PROF_Data_Capture").Select
ActiveSheet.Unprotect
Sheets("PROF_Data_Capture").Copy
Application.Range("A1:B36").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CommandBars("Control Toolbox").Visible = True
ActiveSheet.Shapes("CommandButton1").Select
Application.CutCopyMode = False
Selection.Delete
Application.CommandBars("Control Toolbox").Visible = False
Application.Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
The goal is to export an excel tab into a .csv fyle type, and then user can save this .csv file type with a name they choose. If this is not possible, then is there an automatic way to same to .csv file type based on file name that exporting tab came from? I have watched many videos but I got my head spinning. Any help is greatly appreciated.
I am in need of your help with below vba. I am able to export tab with ease.
However, I want to be able to export it as .csv file type. Is there a vba code that allows me to export as .csv excel file type? If no, then is there a way to export and automatic save as .csv file type on a desktop folder?
Private Sub CommandButton1_Click()
Sheets("PROF_Data_Capture").Select
ActiveSheet.Unprotect
Sheets("PROF_Data_Capture").Copy
Application.Range("A1:B36").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CommandBars("Control Toolbox").Visible = True
ActiveSheet.Shapes("CommandButton1").Select
Application.CutCopyMode = False
Selection.Delete
Application.CommandBars("Control Toolbox").Visible = False
Application.Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub