Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox index question ...
To All,
I have a ListBox on a UserForm that works fine ... what I'm trying to do now is use the .ListIndex in conjunction with offset ... so that I can assign the adjacent cells contents to a Label's caption: LblDescription.Caption I'm stuck trying to convert this index number to an address - with the hope to then use that address and "offset" 1 cell right ... Could someone guide me on the correct procedure ... Thanks, JimP '''''''''''''''''''''''''''''''''''''''''' Private Sub ListBox1_Click() Dim sIndexName As String: sIndexName = "" ' ITEM With Me.ListBox1 If .ListIndex -1 Then sIndexName = .List(.ListIndex) End If End With ' followingline is a problem ... ' LblDescription.Caption = ActiveSheet.Range(sIndexName).Address. _ ' Offset(0, 1).Value End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem using INDEX to select items in listbox | Excel Discussion (Misc queries) | |||
Listbox Question | Excel Discussion (Misc queries) | |||
listbox question | Excel Programming | |||
Listbox Index Problem | Excel Programming | |||
Filling a listbox depending on font index | Excel Programming |