Hi experts,
I'm a newbie in VBA so would appreciate it from the bottom of my heart if someone would help me with this.
What I'm trying to do is Convert a number of excel files to CSV and delete the rows headers then save them to a specific folder.
Now, I figured out how to convert excel to CSV and transfer them to a folder but I'm unable to solve how to delete rows before it is saved to a folder.
Here's the script that I did.
Private Sub CommandButton1_Click()
Dim wb As Workbook
Set wb = Workbooks.Open(Worksheets("Sheet1").Cells(1, 1).Value)
wb.SaveAs Filename:="pathdestination\test1csv.csv", FileFormat:=xlCSV, CreateBackup:=False
wb.Close savechanges:=False
wb.Rows(1).Delete
MsgBox ("Converted to CSV")
Dim wb2 As Workbook
Set wb2 = Workbooks.Open(Worksheets("Sheet1").Cells(3, 1).Value)
wb2.SaveAs Filename:="pathdestination\test2csv.csv", FileFormat:=xlCSV, CreateBackup:=False
wb2.Close savechanges:=False
MsgBox ("Converted to CSV")
End Sub
I hope someone can help, please.
THank you!
-JerryM-
Bookmarks