+ Reply to Thread
Results 1 to 4 of 4

Save data from one workbook to another by pressing a command button

  1. #1
    Registered User
    Join Date
    12-24-2014
    Location
    Ohio
    MS-Off Ver
    2010
    Posts
    13

    Save data from one workbook to another by pressing a command button

    Good morning,
    I've attached two workbooks Request2stock and Need to stock 2198.
    Here is what I need to happen when a command button on the Request2stock workbook is pressed.
    1. Decipher whether the part being requested is electrical or mechanical, Maybe a checkbox could be added to the worksheet.
    2. On the Need to stock 2198 this data from the Request2stock worksheet will be added to a new row under mechanical or electrical and all data will be populated under the corresponding cells, (Description, PartNo and Manufacturer) All other data will be filled in manually by a user.

    I hope someone out there can help with my request.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    650

    Re: Save data from one workbook to another by pressing a command button

    my first thought is this would be a little bit easier if the mechanical and electrical lists were on separate worksheets. doable either way, but it's a little less reliable to try to identify the end of two separate, nonconsecutive lists.

    Also, why are there so many columns being used in Request2Stock? Where will the relevant information be input? Are you planning on having a single number in each of those cells or something? it would be better if the entire thing were input in one cell. Again, This can be written either way it's just a little easier if we only have to reference one cell for each of the values being copied.

    Finally, the code I'm planning to write will require that both workbooks be open for whoever is pressing the button. If you want the code to automatically open that other workbook, transfer the data, save and close it then I'll also need the filepath (or i can just leave a spot for you in the code and you can input the filepath yourself, but you still need to let me know if that's what you want).

    Oh also it seems like we could automate more of this if you had a master-list of all of the possible parts somewhere - the user could just input part number and the code could do the rest... this would be especially useful for determining electrical / mechanical. If you can't provide this then we'll either need a flag somewhere, or we could have separate buttons.
    Last edited by simarui; 04-29-2015 at 09:08 AM.
    Hope I could help - if your post has been solved don't forget to mark it as such.

    Clicking the * below is a great way to say thanks!

    "Drowning in 10 feet of water isnít any different than drowning in a million feet. And if you can swim, it doesnít matter how deep the ocean is. At some level, once you realize youíre in water thatís too deep to stand, you have to have a very different approach," - Joi Ito

  3. #3
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    650

    Re: Save data from one workbook to another by pressing a command button

    this seems to be working where i've created two checkboxes named Mechanical and Electrical and deleted your notes from the Need to Stock page.

    Please Login or Register  to view this content.
    as attached.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-24-2014
    Location
    Ohio
    MS-Off Ver
    2010
    Posts
    13

    Re: Save data from one workbook to another by pressing a command button

    This is perfect simarui,
    Awesome, Great Thank You

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Open/Save/Close Workbook via command button
    By nathan0519 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-31-2015, 11:24 PM
  2. [SOLVED] how to add the userforms to combobox and open it when pressing the command button ?
    By Shacker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2013, 09:10 AM
  3. [SOLVED] command button: specified sheet copy and save as new workbook to specified location
    By Zlatko.Pan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-15-2013, 12:28 PM
  4. Command button auto select after pressing Enter
    By Bafa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2006, 03:05 AM
  5. Save workbook via Command Button????
    By Chris Watson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2006, 06:15 AM

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