+ Reply to Thread
Results 1 to 10 of 10

Scrolldownlist in userform

  1. #1
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    323

    Scrolldownlist in userform

    Hi,

    I was woundering if there is possible to get a scrolldownlist from worksheet 2 collumn B to be linked up to textbox in a userform.

    Best regards
    喕stein

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Scrolldownlist in userform

    see large yellow banner - how to upload a workbook - far easier then to give you a concise solution.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Scrolldownlist in userform

    By "scrolldownlist" do you mean that have that you have a cell with data validation using a Dropdown List? You can link the cell to the textbox using the ControlSource property.

    In the UserForm design screen, click on the textbox, hit F4 to show Properties, and enter the cell reference in the ControlSource field:

    'Worksheet 2'!B1

    where B1 is the cell reference
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    323

    Re: Scrolldownlist in userform

    Thanks for youre reply,

    I tested it, but couldent make it work, so now I have attached a samplefile.
    In the userform I want a scrolldownlist in the textbox that says kunde. I have made a list from Sheet 2 collumn B and called it "Kunderegister", and this is the list I want to use in the userform.

    Challenge number 2:
    I have formulas in sheet A and B that blocks me from starting the registrating from the userform in row 4. I need to start the registration from row 4

    I hope this was a god enough explanation for someone to help me solv this.

    Best regards
    Øystein Breivik
    Attached Files Attached Files

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Scrolldownlist in userform

    Sorry, not clear enough. A textbox cannot be a dropdown list.

    I have taken a guess and modified your UserForm to use a combobox instead of a textbox, which makes most sense to me based on reading your code.

    I have also updated the code to fix this reference.

    Also, your named range Kunderegister uses the entire column B. This is bad. You should just include the used cells. I have modified the range to be dynamic.
    Attached Files Attached Files

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Scrolldownlist in userform

    No idea what you mean in "challenge 2"

  7. #7
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    323

    Re: Scrolldownlist in userform

    Thanks for great help, the combobox workes perfect. The last problem that I still have is that it starts registering the data in row 27 because of the formulas I have in A and B 4 - 26. I need the registration to be started in row 4.

    Hope the explanation is god enough

    Thanks for all help so far.

    Best regards
    Øystein Breivik

  8. #8
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    323

    Re: Scrolldownlist in userform

    Hello,

    I see that my explanation could have been better
    When I register the data from the userform in sheet 1, it should start in row 4 C to H. I have written some formulas in collumn A and B 4 - 26, so now it starts the registration of data in row 27. I need it to start in row 4 but also make it fill in the data in A and B as the formula is supose to do.

    Hope that made more sense

    Best regards
    Øystein Breivik

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Scrolldownlist in userform

    Your code looks for the last used cell in column B (not the last cell with a blank value). You could pick another column. Is there another column that will always be populated when the row is being used?

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    323

    Re: Scrolldownlist in userform

    Thanks for fast reply,
    I just changed it to C, so now it workes perfect. I missed that one when copying the code from another formula

    Regards
    Øystein Breivik

+ 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] Finding client from scrolldownlist
    By Oeysbrei in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-10-2022, 10:51 AM
  2. Userform Combobox - select from list, store this as default each time userform loads
    By thecdnmole in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2014, 07:48 AM
  3. combining chart userform and data transfer userform into 1 userform
    By H_Kennedy in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-04-2014, 07:11 AM
  4. [SOLVED] Excel 2007, Userform Textbox Date Format and Calendar Control Userform
    By riffology in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-03-2014, 06:18 PM
  5. combining chart userform and data transfer userform into 1 userform
    By H_Kennedy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-03-2014, 12:28 PM
  6. [SOLVED] Open a userform from a userform, but preserve the info in the original userform
    By jfoerch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2013, 02:38 PM
  7. userform is large.....how to use scrollbar of userform to show all of the userform
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2010, 04:11 PM

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