Closed Thread
Results 1 to 11 of 11

one userform for multiple sheets

  1. #1
    Registered User
    Join Date
    06-23-2009
    Location
    new jersey, usa
    MS-Off Ver
    Excel 2007
    Posts
    4

    one userform for multiple sheets

    I have workbook with 12 sheets in it. each sheet is identical except that they are for each month of the year. i am using a userform to enter the data into each sheet. Each sheet will have different data. I want to be able to use the same user form on each sheet but still have them insert into the open sheet. Currently I am creating duplicates of the userform for each sheet but it gets VERY!!! tiresome and it is making the workbook VERY large (5 mb so far). For example. the first sheet is "april". i open the userform and enter the data into the userform. the userform enters the data into the sheet. now i go to sheet "may". currently I open a userform in that sheet that looks exactly the same as the userform in sheet "april" but is a completely different userform. I want to be able to use the userform from sheet "april" in sheet "may" but when in sheet "may" it inserts into sheet "may".
    Thank you so much in advance
    Last edited by chromedude; 06-23-2009 at 09:20 PM.

  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,259

    Re: one userform for multiple sheets

    Hello chromedude,

    Welcome to the Forum!

    I would need to the see your workbook. Since 5MB exceeds the upper limit for posting a workbook, you can try zipping the file or create a another workbook with only a 2 or 3 month is in it. If both options fail, you could email the workbook to me.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    06-23-2009
    Location
    new jersey, usa
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: one userform for multiple sheets

    Leith Ross
    here is my spreadsheet. it is zipped. thank you so much. i will be looking forward to your reply
    chromedude
    Attached Files Attached Files

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

    Re: one userform for multiple sheets

    Hello chromedude,

    Thanks for posting a sample workbook. This should be very easy. After a quick glance, it looks like each month (worksheet and UserForm) is laid out the same. If there is some difference, please let me know.

  5. #5
    Registered User
    Join Date
    06-23-2009
    Location
    new jersey, usa
    MS-Off Ver
    Excel 2007
    Posts
    4

    Smile Re: one userform for multiple sheets

    there is no difference

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

    Re: one userform for multiple sheets

    Hello chromedude,

    One form is now used to for new sales on any worksheet. You only need to have the "New Sale" button call the "NewSale" macro. The attached worksbook has all the changes made to it.The biggest code change was to your "Finish" button. Here is the code...
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-23-2009
    Location
    new jersey, usa
    MS-Off Ver
    Excel 2007
    Posts
    4

    Smile Re: one userform for multiple sheets

    Thank you so much! it looks great. i have been working on this for a while.
    Chromedude

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

    Re: one userform for multiple sheets

    Hello chromedude,

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  9. #9
    Registered User
    Join Date
    02-10-2011
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: one userform for multiple sheets

    Hi.

    Is there any way to do this without using code? I have a fairly similar situation that I'm also trying to wrap my head around, and that code means absolutely nothing to me!

    My particular situation is that I have a number of worksheets within the same Excel document, where each worksheet obviously has a different function and thus different columns, but there is also a fair degree of overlap due to generic info that appears on all of the worksheets (i.e. the same columns containing the same info).

    I would therefore like an "elegant" solution in the way of a userform that allows me to enter all of the info for populating all of the various worksheets in one sngle action. This form would then copy both the identical generic info, as well as the different worksheet-specific info that doesn't all apply to every worksheet, to each individual worksheet in one go. I would then only need to complete one (very comprehensive) userform upfront, and all of the worksheets would be updated simultaneously. My challenge, though, is that each entry on the userform will need to populate several rows in each worksheet, as some info columns will be shared by all, whereas other columns will have differing individual info. When any two rows in the same worksheet are compared though, they are different independent records.

    Presently I am updating each individual worksheet separately in a manual action, with my only assistance being the use of data verification dropdown lists attached to each column. There is thus a large degree of duplication in terms of the generic info.

    Have I explained that clearly?

  10. #10
    Registered User
    Join Date
    02-10-2011
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: one userform for multiple sheets

    Just an update from my own side.

    After about 20 views of this thread since my last posting without a single reply, I'm forced to come to the conclusion and answer myself that no, there isn't a way to do this without using code.

    I've thus just acquired the handbook "Excel 2010 Bible", and will thus hopefully be teaching myself how to solve this problem in due course.

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

    Re: one userform for multiple sheets

    Grumpy,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

    This could be one of the reasons why you have not received a reply. If you create a new thread for yourself, you will get several replies.
    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]

Closed 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