I am not from software background and trying to write a macro to avoid repeated work
I would like the code to grab a tab from an excel workbook create a new workbook and save it with a new name and save it to a new file and then to continue grabbing the next tab and do the same as the first step but save it to a new location. the first code below works but I need to manually change the tab each time and location can I automate this with one code with using same code but say next?
Option ExplicitSub Copysheetandsave() Dim sourceWs As Worksheet, savePath As String Set sourceWs = ThisWorkbook.Worksheets("203") savePath = "C:\Users\" sourceWs.Copy With ActiveWorkbook .SaveAs Filename:=savePath & " 2023 YTD.xlsx" .Close False End WithEnd Sub