+ Reply to Thread
Results 1 to 4 of 4

Cant get label to display second column value if combobox value selected

  1. #1
    Registered User
    Join Date
    02-26-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    29

    Cant get label to display second column value if combobox value selected

    Hi all,

    Brand new, bare with me whilst I navigate getting the code displayed properly.

    Excel VBA userform.

    Trying to get a label to display what is in the second column of a table, IF a value in column 0 is selected.

    Please Login or Register  to view this content.
    I keep getting
    "Run-time error '381': Could not get the Column property. invalid property array index.

    I'm pulling the combobox source from the worksheet using the properties window

    Anyone have any ideas? Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    3,552

    Re: Cant get label to display second column value if combobox value selected

    just quick demo code, no error checking code attached
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-26-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    29

    Re: Cant get label to display second column value if combobox value selected

    Thanks, that result seems to work ok. I still get an the error if I scroll to the top of my list using a spin button...

    BUT I've thrown in an
    Please Login or Register  to view this content.
    function to stop the alert and there are no other affects, so I guess something I'll just live with!

    Thanks again!

    Unless you can think of any other ways to remove the error altogether then ill try and mark this as solved!

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    3,552

    Re: Cant get label to display second column value if combobox value selected

    without seeing your application in its entirety (i.e. your workbook) it is difficult to comment constructively.
    initial reaction seeing your code would be , what on earth are you doing

+ 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] Display user selected Text from a Combobox in the footer of Word Document
    By HangMan in forum Word Formatting & General
    Replies: 8
    Last Post: 07-02-2015, 05:58 AM
  2. UserForm ComboBox ONLY display selected items in List
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-16-2015, 01:02 PM
  3. [SOLVED] New to Forms-Display a blank combobox but have one column in it restricted to a combobox?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-14-2013, 09:04 PM
  4. Replies: 0
    Last Post: 06-18-2013, 10:42 AM
  5. [SOLVED] Display a 5 column range in a textbox or scrollable label
    By Kingali in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-17-2013, 02:05 AM
  6. display the results from range of columns when combobox is selected
    By Anchal in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-25-2013, 07:33 AM
  7. display images on the userform when something out of a combobox is selected
    By Ghosty in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2012, 06:07 AM

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