+ Reply to Thread
Results 1 to 20 of 20

Followup question regarding this ListBox and passing Values to Labels

  1. #1
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Followup question regarding this ListBox and passing Values to Labels

    Hello All,

    I keep getting the following error and I have checked everything and cannot find where the error is at!

    error1.jpg


    Any Thoughts I would appreciate!!

    Rgards,

    John
    Attached Files Attached Files
    Last edited by JJFletcher; 11-29-2022 at 11:45 AM.

  2. #2
    Registered User
    Join Date
    04-19-2021
    Location
    Dublin, Ireland
    MS-Off Ver
    O365, Win10 and Mac
    Posts
    47

    Re: Keep Getting Error - Could not set the value property, invalid property value

    You have password protected the project which makes it tricky to help.....

  3. #3
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Re: Keep Getting Error - Could not set the value property, invalid property value

    Hi Corbett,

    Sorry about that - I have corrected that!

    John

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Keep Getting Error - Could not set the value property, invalid property value

    You populated the control using AddItem so you can only have 10 columns. You need to use an array or a range on a sheet to have more than 10.
    Everyone who confuses correlation and causation ends up dead.

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Keep Getting Error - Could not set the value property, invalid property value

    For example:

    Please Login or Register  to view this content.

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

    Re: Keep Getting Error - Could not set the value property, invalid property value

    you have hit the limitation of the .Additem method of populating combobox/listboxes (only allows 10 columns max.).
    you need to use an array and use the .List property of the listbox.
    Torachan,

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

  7. #7
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Re: Keep Getting Error - Could not set the value property, invalid property value

    Hi Rorya,

    TY So much - That fixed it!!!

    Regards,

    John

  8. #8
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Re: Keep Getting Error - Could not set the value property, invalid property value

    Hello All,

    After the change to the code the Search no longer allows the User to enter partial data and then perform the search - Can that be added back?

    Regards,

    John

  9. #9
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Keep Getting Error - Could not set the value property, invalid property value

    What do you mean? I didn’t change the search method.

  10. #10
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Re: Keep Getting Error - Could not set the value property, invalid property value

    Hi Rorya,

    Thanks for the feedback... It should be able to search by any column by entering partial data into the TextBoxes, Name, Sup etc... the code now seems to be directed primarily to

    Please Login or Register  to view this content.
    And I apologize in advance - it did seem as though when first seeking a solution here in the Forum that the search method may have appeared as numeric only....

    Regards,

    John
    Last edited by JJFletcher; 11-28-2022 at 10:40 AM.

  11. #11
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Keep Getting Error - Could not set the value property, invalid property value

    OK, you'll need a slightly different approach for partial matches as some of your columns are numeric. Try this:

    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Re: Keep Getting Error - Could not set the value property, invalid property value

    Hi Rorya,

    Works like a charm.... OUTSTANDING!!!!!!

    Thanks much... I would give you another Rep but the system won't let me!

    Regards,

    John

  13. #13
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Keep Getting Error - Could not set the value property, invalid property value

    No worries - just happy to help.

  14. #14
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Re: Keep Getting Error - Could not set the value property, invalid property value

    Hello All,

    Followup question for this ListBox...

    My Listbox is call Results and I have read somewhere that the columns can pass the value (Total) to a Label...

    Please Login or Register  to view this content.
    Would this be accurate???

    Regards,

    John

  15. #15
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Keep Getting Error - Could not set the value property, invalid property value

    No. Which value from the listbox are you trying to pass? A specific row and column, or the total of a particular column?

  16. #16
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Re: Followup question regarding this ListBox and passing Values to Labels

    Hi Rorya,

    yes - I would like to pass the value Total of all columns to labels below the Listbox Columns 7 to 15

    I would assume that it could be a single column (7) and then it can be replicated as needed for each column in the ListBox.
    Last edited by JJFletcher; 11-29-2022 at 11:25 AM.

  17. #17
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Followup question regarding this ListBox and passing Values to Labels

    You'd need something like Application.Sum(Application.Index(Me.Results.List, 0, 7)) and so on.

  18. #18
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Re: Followup question regarding this ListBox and passing Values to Labels

    Sorry - please disregard - I got it
    UGH!!!
    Last edited by JJFletcher; 11-29-2022 at 11:43 AM.

  19. #19
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Followup question regarding this ListBox and passing Values to Labels

    What do you mean? You just use what I showed.

  20. #20
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Re: Followup question regarding this ListBox and passing Values to Labels

    Thanks for the feedback - I got it!!

    I appreciate you

+ 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. Could not set the RowSource property. Invalid Property Value error when switching bet
    By sathyaganapathi in forum Access Programming / VBA / Macros
    Replies: 6
    Last Post: 08-03-2021, 06:54 AM
  2. [SOLVED] Error 381Could not set the List property. Invalid property array index
    By desonny in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2020, 08:33 AM
  3. Replies: 5
    Last Post: 06-02-2020, 04:56 PM
  4. Runtime error 381: Could not set the list property.Invalid property array index
    By rohith4prithvi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2014, 10:24 PM
  5. [SOLVED] Excel run-time error '381': Could not set the List property. Invalid property array index
    By eemiller1997 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-20-2012, 12:48 PM
  6. Replies: 2
    Last Post: 06-11-2012, 03:03 PM
  7. Runtime Error 380 – Could not set the list property. Invalid property value
    By BernzG in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2005, 05:10 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