Hi All
I'm working on a stock management system for work.
The workbook is attached for reference. Please see the attached screenshot image of the userform in question.
The machines in the left listbox are from the "machinelist" worksheet, which is in the following format:
MachineID | Machine Name | Rent Cost | GroupID
The GroupID is picked from a group of machines which the stock is for, and comes from the "grouplist" worksheet which is as follows:
GroupID | Group Name
So in this edit machine userform, it pulls across the GroupID, when you select each machine from the listbox. What I need it to do is select the group that it's in automatically from the right hand group listbox.
So in the example, you can see that "1 Cranes" is selected for E-Claw. That is correct. But if I then click on "3 Clenaflex 1 (Rec)" that is in Group 2 which is "Clenaflex & Barber Cut" so I want it to automatically highlight the 2nd option in the listbox.
I've researched on the internet and lots of people talking about using the "ListIndex" property - however I get an error saying this is an invalid property as there is no ListIndex property for a listbox...
Is anyone able to help at all?
If you go into the crane.xls workbook, you'll need to click on "Load Menu" button, then machine maintenance, then it's the "edit machine" button - ignore the msgboxes that appear when it first loads - they were for diagnostic purposes.
Thanks in advance! This is driving me mad :-(
Bookmarks