I have the below piece of code which save as a workbook to a new location and assign the new file to a new variable. However, the second part of the code, the part which assign the new workbook to the new variable gives me an error of Out of subscription
Any ideas?
Declare workbooks
Dim wb As Workbook
Dim newwb As Workbook
'Save as new workbook
wb.SaveAs Filename:="C:UsersXXXXDesktopWorkspaceXXXX ToolXXXX Workbook " & strYear & ".xlsm", FileFormat:=52`
'Set the new workbook
Set newwb = Workbooks("C:UsersXXXXDesktopWorkspaceXXXX ToolXXXX Workbook " & strYear & ".xlsm")