LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem using INDEX to select items in listbox Shazbot Excel Discussion (Misc queries) 3 April 28th 06 09:06 AM
Listbox Question Greg B Excel Discussion (Misc queries) 1 March 9th 05 02:17 PM
listbox question GMet Excel Programming 1 September 27th 04 07:59 PM
Listbox Index Problem Todd Huttenstine Excel Programming 3 April 26th 04 05:22 PM
Filling a listbox depending on font index Trevor[_3_] Excel Programming 0 October 1st 03 08:25 PM


All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"