Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Naming New Workbook (XL97;SR2)

    When using "workbooks.add" is it possible to create the new workbook with a specific file name?

    Thanks,
    John

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Naming New Workbook (XL97;SR2)

    Hi John,
    Yes it is but you don't do it when you create the workbook. You use something like:
    set wbk = Workbooks.add
    wbk.saveas FileName:="Whatever.xls"
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    5 Star Lounger
    Join Date
    May 2002
    Location
    43.8N 81.0W, Ontario
    Posts
    815
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Naming New Workbook (XL97;SR2)

    Hi Rory

    Is it possible to rename a workbook without saving it?

    Have a Great day!!!
    Ken
    <IMG SRC=http://www.wopr.com/w3tuserpics/KenK_sig.gif>

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Naming New Workbook (XL97;SR2)

    You can rename the file, but not if it is currently open.
    Legare Coleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •