Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Naming new workbook

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Naming new workbook

Thank you Dave

"Dave Peterson" wrote:

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



PraxisPete wrote:

Hi, I€„¢m using 2002 and I€„¢m 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 I€„¢ve explained this clearly


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbook "Sheet" Naming comotoman Excel Discussion (Misc queries) 4 September 30th 05 09:49 PM
Workbook naming Jenny Excel Programming 2 September 2nd 04 04:47 PM
Workbook naming Jenny Excel Programming 1 September 2nd 04 03:36 PM
Workbook naming Jenny Excel Programming 1 September 2nd 04 03:16 PM
Naming an Excel Workbook SunTzuComm Excel Programming 0 August 20th 04 05:53 PM


All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"