Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 4 of 4

Thread: Add New Workbook With Name

  1. #1
    Join Date
    10th June 2005
    Posts
    24

    Add New Workbook With Name

    Can anyone tell me how to using VBA add a new Workbook with a name? I know it is something like: Workbooks.Add.name="abc" or Workbooks("ABC").Add. Thank you very much in advance.

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    24th January 2003
    Location
    Australia
    Posts
    31,717

    Re: Vba To Add A New Workbook With Name

    VB:
    Sub AddNewWBook() 
        Dim wbNew As Workbook 
        Set wbNew = Workbooks.Add() 
         
        wbNew.SaveAs Filename:="Your path and name" 
    End Sub 
    
    

  3. #3
    Join Date
    10th June 2005
    Posts
    24

    Re: Add New Workbook With Name

    Thank you, Dave. But I prefer not to save a hard copy on hard drive and delete it later. I would rather to make save or not decision when I close the Workbooks. Is there a way?

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    24th January 2003
    Location
    Australia
    Posts
    31,717

    Re: Add New Workbook With Name

    If aren't going to keeping the Workbook, why name it? If you want the choice, simply remove the last code line.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Replies: 8
    Last Post: June 26th, 2008, 07:05
  2. Replies: 21
    Last Post: September 13th, 2007, 04:27
  3. Replies: 1
    Last Post: June 21st, 2007, 21:21
  4. Replies: 4
    Last Post: March 30th, 2007, 00:26
  5. Replies: 6
    Last Post: May 25th, 2006, 21:58

Bookmarks

Posting Permissions

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