I have a question regarding a Macro that I am trying to make.
What I have set up is a UserForm that I have made with two listboxes as well as a command button. The listboxes show information from 2 categories, and when you pick one of both options and hit the command button, it displays a few characteristics that each category has, like length and width. The trouble I'm having is I need to be able to find and display the dimensions of each object, however, the way I have been trying to accomplish this hasn't been working. I the method I used to find the row of the selected item is as follows
rowV1 = Application.WorksheetFunction.Match(ListBox1.Value, Range("List!A1:A50"), 0)
rowT1 = Application.WorksheetFunction.Match(ListBox2.Value, Range("List!I1:I20"), 0)
This method works, and it is stored in the above variables, and the columns for the width are the same for each category. The way I tried to find the value of the width was using this piece of code and it wasn't working.
width1 = Cells(rowV1, 6).Value
width2 = Cells(rowT1, 13).Value
Cells(7, 2).Value = width1
Cells(8, 2).Value = width2
I need to do the same process for the length, but I am not sure how to go about this.
Any help is appreciated. Thank you!
Bookmarks