I have seen excellent examples of how to save all sheets in a workbook as separate csv files. But, I only want to save a "range" of sheets as csv files.
Here is my code
In my project, I want to save Sheet35 through Sheet65 as separate csv files.
How do I change the above code to only save those sheets?
I am sure it involves a For...Next statement but I have no experience with those, yet.
Thanks for any assisance.
TcO
Here is my code
Code:
Sub Save_Each_Worksheet_as_CSV()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
'path to save location
ws.SaveAs "S:\MyLocation\" & ws.Name & ".csv", xlCSV
Next
End Sub
In my project, I want to save Sheet35 through Sheet65 as separate csv files.
How do I change the above code to only save those sheets?
I am sure it involves a For...Next statement but I have no experience with those, yet.
Thanks for any assisance.
TcO