I have this code that I'm trying to get working to save my workbook to the location entered in cell G11.
It hangs on sPath As String =
saying "constant expression required"
Thanks for looking
It hangs on sPath As String =
saying "constant expression required"
Code:
Sub BackUpAnDSaveCountSheet()
Dim savelocation As Range
savelocation = Sheets("Data").Range("G11").Value
Const sPath As String = savelocation
Dim sFileName As String
sFileName = VBA.Format(Now, "mmddyy_hhmmss") & ThisWorkbook.Name
ThisWorkbook.SaveCopyAs sPath & sFileName
End Sub
Thanks for looking