+ Reply to Thread
Results 1 to 4 of 4

Automatically save file with cell value + copy cell values to other workbook

  1. #1
    Registered User
    Join Date
    04-02-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    3

    Automatically save file with cell value + copy cell values to other workbook

    I'm trying to create a small application which lets the user fill in a template invoice. At completion a form button will be used to simultaneously do the following things:

    1) Print the current sheet
    2) Do a 'Save As' at a specific location and using a cell value for the file name (save as invoice number combined with surname .xls in folder 'exceltestfolder')
    3) Store the values of a set of specific cells in another workbook (customer name, address, etc so we can build up an invoice 'database')


    I have used the following code to do the Save As:

    Please Login or Register  to view this content.
    Can anybody help me with the extra code needed to do 1) and 3)?
    Last edited by arlu1201; 04-05-2013 at 10:59 AM. Reason: Use code tags in future.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Automatically save file with cell value + copy cell values to other workbook

    1 is doable.

    For 3, which are the cells which need to get copied to the database? Also, the macro needs to open the database, populate the values and close it?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    04-02-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Automatically save file with cell value + copy cell values to other workbook

    Since I solved half of the question asked here, I started a new thread on just step 3: http://www.excelforum.com/excel-prog...03#post3191703

    @ arlu1201: Yes, the macro should open the other workbook, populate the values and close it. All in the background, if possible. (So the user doesn't see it)

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Automatically save file with cell value + copy cell values to other workbook

    Ok, so lets solve 1 and 2 in this thread.

    Regarding 1, whats the name of the sheet which needs to be printed?

    Regarding 2, which cell contains the filename?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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