+ Reply to Thread
Results 1 to 7 of 7

Change status of more than one item selected in Listbox

  1. #1
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2019
    Posts
    346

    Change status of more than one item selected in Listbox

    I have a Userform with a Listbox, which list items from sheet1 column A. In Column D is the status of each item
    The Listbox's MultiSelect is fmMultiSelectMulti and the ListStyle is fmListStyleOption, so I can select more than 1 item
    to change the status.

    I am using this code with a Commandbutton, but gets an error

    Please Login or Register  to view this content.
    Last edited by CobraLAD; 02-29-2012 at 05:11 AM.

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Change status of more than one item selected in Listbox

    Where does the error occur when debugging?

  3. #3
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2019
    Posts
    346

    Re: Change status of more than one item selected in Listbox

    error is:

    Run-time error '91':
    Object variable or With block variable not set


    Please Login or Register  to view this content.

  4. #4
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2019
    Posts
    346

    Re: Change status of more than one item selected in Listbox

    I have attached the file. The form is in afrikaans. The error is on the Wash Button, you need to select combobox1, 2 & 3 before the button will be enabled
    Attached Files Attached Files

  5. #5
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Change status of more than one item selected in Listbox

    You know that TransferItem - the value you are searching for - is just a number from 0 to one less than the number of items in the listbox?
    Good luck.

  6. #6
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2019
    Posts
    346

    Re: Change status of more than one item selected in Listbox

    ok whatever that means, but that still does not help me. Is there anybody that can fix the code for me. Please. I only use this forum if I am stuck. I do not do this all the time it is more like a hobby

  7. #7
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2019
    Posts
    346

    Re: Change status of more than one item selected in Listbox

    Thank you Rory, I know it was only something small and to put the wording in the correct order.

+ 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