+ Reply to Thread
Results 1 to 5 of 5

User Form and Select Case Help

  1. #1
    Registered User
    Join Date
    04-15-2011
    Location
    Dallas,TX
    MS-Off Ver
    Excel 2010
    Posts
    21

    User Form and Select Case Help

    Hey Guys...

    I have created a user form where the user inputs sales data for certain locations. The data that is inputed is then displayed into certain worksheets depending on the values.

    For example, the user form contains a combo box where user can select weeks 1 - 4, another combo box where he can select the location, a 'total revenue' txt box, 'gop' text box, and rooms sold text box.

    depending on which week the user selects, i want the data to be input into that specified worksheet. For example, submitting data for week 2 at Hotel A, will input data into worksheet two and in the Hotel A row.

    I tried using Select Case, but I am running into some problems.

    I have attached the sample worksheet for your review.

    Also, below is the code I have written so far. Help would be appreciated. Thanks!

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by yusunghee; 04-16-2011 at 06:33 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,620

    Re: User Form and Select Case Help

    Please Login or Register  to view this content.
    Last edited by protonLeah; 04-16-2011 at 07:11 PM.
    Ben Van Johnson

  3. #3
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: User Form and Select Case Help

    Hello yusunghee:
    I've made the following changes to your code
    1) Selecting a week in the Week Drop down Immediately takes you to that sheet
    2) Selecting a hotel Immediately highlights the hotels column AND fills the forms text fields with any values the specific Hotel has on the current week sheet
    3) The Submit Button is greyed out until a valid Week and Hotel have been selected .. then it is enabled
    4) Top of form module has been given variables for specific columns

    With all this in mind here's you submit procedure ...

    Please Login or Register  to view this content.
    ATTENTION: This procedure only works when used in conjunction with a form that has all the changes I've made.. see attached file.
    Attached Files Attached Files
    Last edited by nimrod; 04-16-2011 at 11:38 PM.

  4. #4
    Registered User
    Join Date
    04-15-2011
    Location
    Dallas,TX
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: User Form and Select Case Help

    Thanks guys! This helps a lot. Both codes are so much simpler than what I was thinking.

  5. #5
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: User Form and Select Case Help

    Hello yusunghee:
    Make sure you try my attached sample ... you will see that things now happen when you click on Hotel and Week drop downs.... afte testing you can leave a comment by clicking on the "scales" icon.

+ 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