+ Reply to Thread
Results 1 to 4 of 4

Getting ComboBox2 to pull from sheet range

  1. #1
    Registered User
    Join Date
    12-10-2020
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    15

    Getting ComboBox2 to pull from sheet range

    I am having a hell of a time getting something simple to work and I am stuck.

    I have a userform. In this userform I have a combobox (Combobox2) I want ComboBox2 to populate based on a range from a different sheet in the same workbook.

    I have tried this code

    Combobox2.List = Range(Cells(2, 1), Cells(100, 1)).Value

    And that works but it is pulling the information from the wrong sheet. So I tried to call out what sheet I wanted it from and so I wrote this

    Combobox2.List = Worksheets(Sheet5).Range(Cells(2, 1), Cells(100, 1)).Value

    This is where the whole world falls apart. Why does this not work?



    I have attached the workbook.

    Since I am already asking. I do plan on getting ComboBox3 to populate with the contact name based on what customer gets selected in ComboBox2. I do not know where to begin with that.



    Thanks

    UPDATE:
    So I tried changing it to this

    Combobox2.List = Worksheets(Sheet5).Range("A:A).Value

    And it works but I want it to start at Row 2, that's why I went with the Cells and I was planning on using the CountA function to find where the last row was and use that to get the exact length of the range.
    Last edited by Pmuel; 03-18-2021 at 03:42 PM.

  2. #2
    Registered User
    Join Date
    12-10-2020
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    15

    Re: Getting ComboBox2 to pull from sheet range

    Here it is
    Attached Files Attached Files

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Getting ComboBox2 to pull from sheet range

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

    Re: Getting ComboBox2 to pull from sheet range

    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

+ 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. Code to pull row 'B-R' to another sheet based on a number range of one cell
    By Celliott89 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-16-2020, 06:23 PM
  2. [SOLVED] Match Cell Name in Range to Sheet name and pull last Row from that Sheet
    By morangeman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-25-2017, 12:25 AM
  3. Replies: 17
    Last Post: 06-13-2017, 12:12 PM
  4. Replies: 5
    Last Post: 01-17-2016, 12:51 AM
  5. Replies: 1
    Last Post: 04-20-2015, 03:18 PM
  6. Formula to pull data from one sheet to a new sheet based on date range
    By lisajolley11 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2015, 08:38 PM
  7. Replies: 0
    Last Post: 04-16-2012, 05:21 AM

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