Hi all
Been wracking my brain over this and have tried looking at existing posts and it's still not working for me .
My goal is to, on a monthly basis, copy sheets from one workbook and take those copies to form a new workbook, saving it a variable file location (ie when I run in September, save in September folder, when I run in October, save in October folder). The file name can change and is dependent on what I write in a cell.
Dim Path As String
Dim month As String
month = Sheets("COMMAND").Range("A1")
'fyi in cell A1 I have 2023.09.30/Data/Filename. Cell A1 contains a formulae which merges together the 3 components (2023.09.30&/Data/Filename)
Path = "https:blahblah/Marketing/Sheets/"
Sheets(Array("Sheet1", "Sheet2")).Copy
ActiveWorkbook.SaveAs filename:=Path & month
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False 'I get a syntax error on this line =S
Range("C7").Select
ActiveWindow.Close
Range("H6").Select
Any help would be hugely appreciated
thanks
angelos
Bookmarks