+ Reply to Thread
Results 1 to 4 of 4

How to Export UserForm with VBA to new Excel file

  1. #1
    Registered User
    Join Date
    01-27-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    5

    How to Export UserForm with VBA to new Excel file

    Hi,

    I am copying an existing sheet to a new Excel file by using following code.
    Please Login or Register  to view this content.

    above code only copies the sheet in new Excel File, I want to export an existing UserForm from the same file to the new file as well.

    Any help is greatly appreciated.

    Regards,
    Sweek
    Last edited by Leith Ross; 09-14-2011 at 10:46 PM. Reason: Added Code Tags

  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: How to Export UserForm with VBA to new Excel file

    Why not use saveas & delete the other sheets from the new workbook? That's easier than attempting code to copy a userform
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    01-27-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to Export UserForm with VBA to new Excel file

    I am creating a template that will be used by multiple users.
    Concept is like Data Entry-
    1. I have a UserForm and whatever data entered by user is saved in a new workbook.
    2. I am placing a View Data button on the New workbook that is output of step 1.
    3. what i need is on click of view data button same form that i used for Data entry in step 1 should just show the data.
    4. so on creation of new workbook if i export the existing form as well it all solves my problem.

  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: How to Export UserForm with VBA to new Excel file

    Hi Sweek

    Check out this link http://www.mrexcel.com/forum/showthread.php?t=56530

    The code appears to do as you describe.
    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.

+ 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