View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default Naming new workbook

activeworkbook.saveas filename:="whatever that was\" & newname & ".xls"



PraxisPete wrote:

Hi, Im using 2002 and Im new to VB.
I need to save a new workbook with a file name.
The file name is stored in a variable called NewName
If I code as below

ActiveWorkbook.SaveAs FileName:= _
:\c€¦..\NewName.xls

Of course, the file is saved as Newname.xls and not as the contents of the
variable NewName is there another way ?

Many thanks,
PS I hope Ive explained this clearly


--

Dave Peterson