I am trying to write a macro in VBA that saves the original workbook as a macro free workbook and then re-open the original macro enabled file, but ehat I have written is bugging out when it tries to open code (which is the last line of code). The error I get is a dialogue box that states that the file is unable to be found, however the file path provided is correct. Is the issue that I am trying to finish running the macro, while the workbook that is open is a generic Excel workbook (not macro enabled)? Code is below:
Sub SaveReport()
' SaveReport Macro
Dim strFileName As String, strOpen As String
strFileName = Application.Range("Attach").Value
strOpen = Application.Range("Open").Value
ActiveWorkbook.Save
Sheets("Email").Visible = False
ActiveWorkbook.SaveAs (ThisWorkbook.Path & "\" & strFileName & ".xlsx"), FileFormat:=xlOpenXMLWorkbook
Workbooks.Open strOpen
End Sub