#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Tony Barla

Hi,

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Option Explicit
Dim RNG_B As Range
Dim RNG_C As Range
Dim CL As Range

Private Sub UserForm_Initialize()

Set RNG_B = Range("Sheet1!B1:B" & Cells(Rows.Count, "B").End(xlUp).Row)
For Each CL In RNG_B
ListBox1.AddItem CL
Next

End Sub

Private Sub ListBox1_Click()

Set RNG_C = RNG_B.Offset(0, 1)
With ListBox1
If .ListIndex -1 Then
RNG_C.ClearContents
RNG_C(.ListIndex + 1, 1).Value = .List(.ListIndex)
End If
End With
e:

End Sub
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


--
Regards,
Soo Cheon Jheong
_ _
^ąŻ^
--


Reply
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



All times are GMT +1. The time now is 10:30 AM.

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

About Us

"It's about Microsoft Excel"