+ Reply to Thread
Results 1 to 4 of 4

A button that opens a new workbook and saves the current worksheet on to it

  1. #1
    Registered User
    Join Date
    01-14-2008
    Posts
    76

    A button that opens a new workbook and saves the current worksheet on to it

    hello

    i bassically wanted to know if theres a way that if i click the button ie macro then it would save the current worksheet on a new workbook so the button would open the workbook and save the worksheet on to it

    for example

    if i was creating a finacial spreadhseet and i wanted to keep a record of all the invoices before the date is cleared, i would need a button that would open another workbook and cave the invoice on that

    thanks in advance

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello shilpz,

    The VBA code to save a worksheet as a new file is as follows. Change "Sheet1" to the name of the worksheet you want saved. The file name in the example is Invoice 2007001.
    Please Login or Register  to view this content.
    If you want the button to save the currently active sheet use this code...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    01-14-2008
    Posts
    76
    thanks alot

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Here's an alternative

    Option Explicit

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1