+ Reply to Thread
Results 1 to 9 of 9

Userform with option to select which worksheet data is posted to.

  1. #1
    Registered User
    Join Date
    11-22-2013
    Location
    USA
    MS-Off Ver
    2003, 2007, 2010, Office 365
    Posts
    31

    Question Userform with option to select which worksheet data is posted to.

    I have a spreadsheet with a userform to enter data into 9 different columns. This userform only enters data on sheet 1 of my database. I have determined that it is necessary to be able to choose a new worksheet when a new month starts. Hence, 12 worksheets are required. If I understand correctly, I can use a control button for each month, or use a drop down menu to select which worksheet the corresponding data will post to. I have searched for days to find an example that I can model from. I know very little about VBA programing and the examples that I have found have only left me more confused. I would very much appreciate any assistance I can get.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Userform with option to select which worksheet data is posted to.

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    11-22-2013
    Location
    USA
    MS-Off Ver
    2003, 2007, 2010, Office 365
    Posts
    31

    Re: Userform with option to select which worksheet data is posted to.

    Wow, thanks for the amazingly fast reply.

    Userform Test.xls attached. The worksheet "Data" is nothing except where I began experimenting with the userform. As you will see, when the "Add Record" button is clicked, it takes you to the "Jan" worksheet but the data is written on the "Data" sheet. As way of a side note, I also want to place a button on the summary page to start the userform.
    Attached Files Attached Files
    Last edited by Zimmerray1; 11-23-2013 at 05:19 PM. Reason: Found mistakes in a couple of my formulas.

  4. #4
    Registered User
    Join Date
    11-22-2013
    Location
    USA
    MS-Off Ver
    2003, 2007, 2010, Office 365
    Posts
    31

    Re: Userform with option to select which worksheet data is posted to.

    I got the "Button" placed on the summary page to invoke the Userform. My first try resulted in any where I clicked on the page the Userform came up.

  5. #5
    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: Userform with option to select which worksheet data is posted to.

    Hi Zimmerray1

    Welcome to the Forum!!

    I'm only guessing what you wish to do. This Code is attached to the Add Record Button on your UserForm. It adds the Record to the appropriate Month and to the Data Sheet.
    Please Login or Register  to view this content.
    Let me know of issues...
    Attached Files Attached Files
    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.

  6. #6
    Registered User
    Join Date
    11-22-2013
    Location
    USA
    MS-Off Ver
    2003, 2007, 2010, Office 365
    Posts
    31

    Re: Userform with option to select which worksheet data is posted to.

    Jaslake,
    Thanks for your assistance. What you have done is going in the general direction I am looking for. But not quiet there yet. As very obvious, this database is for a bank account which has numerous sub accounts. The work sheet named "Data" has no usefulness at all. It was only inserted when I started playing with the userform to give my entries a place to go. So in the end result, my plan is to delete that worksheet.

    Yes, when I enter data with a January date, it goes to "Jan" worksheet; February date to "Feb", and so on. Here is where I have a problem with your code. My bank statement runs from week 2 of one month through week 2 of the following month. My February statement will contain dates ranging from January 14th plus or minus a few days, to February 14th plus or minus a few days. I need to be able to either choose a month from a pull down list, OR, have 12 buttons with month labels on them, so that when I choose that month the data goes to that particular month worksheet regardless of date. If I enter for example a date of 8-14-13 and press or choose the "Feb" option, I would end up with that entry in the Feb worksheet.

    Attached is my latest version with some dummy dates and figures. Both "Jan" and "Feb" are completed. The next entry will be in "Mar" worksheet and have an approximate date of 2-15-13. And the "Data" sheet is gone.

    I hope I haven't totally confused you. Appreciated.
    Attached Files Attached Files

  7. #7
    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: Userform with option to select which worksheet data is posted to.

    Hi Zimmerray1

    Try the Code in the attached. Note that the Code is not inserting a Row for each Entry to the Month Worksheet such that you'll soon run out or Rows above your Formula lines. Need help with that let me know.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    11-22-2013
    Location
    USA
    MS-Off Ver
    2003, 2007, 2010, Office 365
    Posts
    31

    Re: Userform with option to select which worksheet data is posted to.

    Quote Originally Posted by jaslake View Post
    Hi Zimmerray1

    Try the Code in the attached. Note that the Code is not inserting a Row for each Entry to the Month Worksheet such that you'll soon run out or Rows above your Formula lines. Need help with that let me know.
    You have been most helpful. Thank you so much! My wife will be tickled pink. I can insert rows manually unless you have the desire to do that. Once again thanks!

  9. #9
    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: Userform with option to select which worksheet data is posted to.

    Hi Zimmerray1

    I'm happy for you and your Wife for this
    My wife will be tickled pink
    It doesn't often happen that we "mere mortal men" can provide that for our Beloved and Far Superior Women Folk (not kidding, I believe that)...when we can, hopefully, they'll store those "points" somewhere that we can cash in later...we'll need them as I'm certain you know.

    I'll play with this as it can be done with Code...check back on your Thread periodically for an update.
    I can insert rows manually unless you have the desire to do that
    You're welcome...glad I could help. Thanks for the Rep.

+ 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. [SOLVED] Populate userform radio (option) buttons based on data in worksheet
    By d.sanchez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-24-2013, 01:21 PM
  2. [SOLVED] Sales & Purchase Value Update Using UserForm "Select Entry Option With or Without GST"
    By DKTRL in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-24-2013, 10:02 AM
  3. Select Row from worksheet and update by userform
    By herghost in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-13-2012, 11:48 AM
  4. Userform option button starts a loop that searches worksheet and populates listbox
    By silvertyphoon1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2010, 01:58 AM
  5. Userform SelectRange - Select from different worksheet
    By Jessica.Bush in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-20-2010, 05:44 PM

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