View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_6_] Otto Moehrbach[_6_] is offline
external usenet poster
 
Posts: 201
Default Save to Path & Variable file name

Excel 2002, WinXP
When I know the file name, the following code works just fine:
ActiveWorkbook.SaveCopyAs ("C:\Folder1\Folder2\Folder3\MyFile.xls")

I now need to do the same thing but with a variable file name, say
VariableFileName (includes ".xls").
My problem is that I can't get the syntax right.
How do write the above line of code if the file name is a variable? Thanks
for your help. Otto