J
Jrew23
Hello, I think this is a relatively easy question. Can someone let me
know what the correct syntax is below? Thanks in advance
Sub MyTest()
Application.ScreenUpdating = False
Dim myFileName As String
Dim myWorksheetName As String
Dim myFolder As String
myFolder = "C:\My Documents\"
myFileName = Range("A1").Value
Debug.Print myFolder
myFileName = myFolder & myFileName & ".xls"
Debug.Print myFileName
'***********************************************************************************************
' problem with my syntax below (see ampersand myfilename ampersand)
' please correct
ActiveWorkbook.SaveAs Filename:="&myfilename&",
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
'**********************************************************************************************
Application.ScreenUpdating = True
End Sub
know what the correct syntax is below? Thanks in advance
Sub MyTest()
Application.ScreenUpdating = False
Dim myFileName As String
Dim myWorksheetName As String
Dim myFolder As String
myFolder = "C:\My Documents\"
myFileName = Range("A1").Value
Debug.Print myFolder
myFileName = myFolder & myFileName & ".xls"
Debug.Print myFileName
'***********************************************************************************************
' problem with my syntax below (see ampersand myfilename ampersand)
' please correct
ActiveWorkbook.SaveAs Filename:="&myfilename&",
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
'**********************************************************************************************
Application.ScreenUpdating = True
End Sub