Results 1 to 7 of 7

Change status of more than one item selected in Listbox

Threaded View

  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

    Sub Transfer_Item_To_Wash()
    Dim TransferItem As Long
    For TransferItem = 0 To ListBox1.ListCount - 1
        If ListBox1.Selected(TransferItem) = True Then
        Sheet1.Range("A:A").Find(TransferItem, LookIn:=xlValues, lookAt:=xlWhole).Offset(0, 3).Value = "Wash"
        ListBox1.RemoveItem TransferItem
        End If
    Next
    End Sub
    Last edited by CobraLAD; 02-29-2012 at 05:11 AM.

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