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
JE McGimpsey - 09 Jan 2006 16:28 GMT
Not sure why the &s and quotes - did you try:
ActiveWorkbook.SaveAs Filename:=myFileName, _
??
> Hello, I think this is a relatively easy question. Can someone let me
> know what the correct syntax is below? Thanks in advance
[quoted text clipped - 29 lines]
>
> End Sub
Jrew23 - 09 Jan 2006 16:56 GMT
That worked. Simple enough! I have to aplogize for taking up your
time! Thanks!!!!