+ Reply to Thread
Results 1 to 7 of 7

Saving userform data to different workbook

  1. #1
    Forum Contributor
    Join Date
    07-26-2007
    MS-Off Ver
    2007
    Posts
    102

    Saving userform data to different workbook

    Is it possible to have a userform open in a workbook and when the data from the form is saved, save it to a completely different workbook. If so, will that other workbook need to be open for the userform data to be saved?

    Thank you
    Last edited by jcarstens; 11-02-2009 at 11:21 PM.

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

    Re: Saving userform data to diff workbook

    The code will need to open the workbook then save to it. Not difficult, you need to specify the workbook & sheet to write to.

    Hide the procedure by switching off screen updating
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    07-26-2007
    MS-Off Ver
    2007
    Posts
    102

    Re: Saving userform data to diff workbook

    Would you mind helping me out with this. I attached a sample. The user form is in Workbook test1 and I would like the data saved in both workbook test1 and duplicately in workbook test2. I undestand the pathe will change on your machine, but if you could help me out with the layout, that would be extremely helpful.

    Thank You
    Attached Files Attached Files

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Saving userform data to different workbook

    Hi jcarstens
    I've modified your code to copy the userform data to Test2.xlsx. The procedure assumes both workbooks are in the same folder.
    Let me know of issues. John

    PS: I should have pointed out that the procedure assumes Test2.xlsx is closed when you click Button1. If you need to include a test to see if Test2 is open, that can be added.
    Attached Files Attached Files
    Last edited by jaslake; 11-02-2009 at 10:08 PM. Reason: PS
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Forum Contributor
    Join Date
    07-26-2007
    MS-Off Ver
    2007
    Posts
    102

    Re: Saving userform data to different workbook

    That is perfect, thank you.

  6. #6
    Registered User
    Join Date
    06-28-2014
    Location
    Bombay
    MS-Off Ver
    2007
    Posts
    33

    Re: Saving userform data to different workbook

    That is Really Helpful "jaslake"
    Have a Great Day
    John Cruz

  7. #7
    Registered User
    Join Date
    01-28-2022
    Location
    USA
    MS-Off Ver
    MS 365 Apps Enterprise
    Posts
    2

    Thumbs up Re: Saving userform data to different workbook

    Its been a long time since your code was posted jaslake, rest assured that it is still as useful as the day you posted!
    thank you so much!!

+ 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