I have searched the web and this site to try and understand and use the SaveAs method. I used the following code, but the problem I have with it is it creates the csv for the whole workbook and not for the range I have selected. How can I change it to use a selected range?
My range
I did find some code on another site that required a whole lot more lines of code and does not use the SaveAs method if I cannot use the SaveAs method.
Thanks
Code:
ThisWorkbook.Worksheets("REMITTANCE").SaveAs Filename:="C:\Remittance\testremit.csv", FileFormat:=xlCSV
My range
Code:
Sub SelectRemitRange()
Dim RemitLastRow As Long
Dim RemitLast As Integer
ThisWorkbook.Worksheets("REMITTANCE").Activate
RemitLastRow = Cells(Cells.Rows.Count, "b").End(xlUp).Row
RemitLast = RemitLastRow
Range("A1" & ":X" & RemitLast).Select
End Sub
I did find some code on another site that required a whole lot more lines of code and does not use the SaveAs method if I cannot use the SaveAs method.
Thanks