Thread: Tony Barla
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tony Barla Tony Barla is offline
external usenet poster
 
Posts: 6
Default Tony Barla

Hi All,

I'm using the below code to fill a listbox from items in a range starting from
cell B1. (Saw it the other day on these forums, from a question by Al...)
-------------------------------------
Private Sub UserForm_Initialize()
Dim r, c As Range
With Sheets("Sheet1")
Set r = .Range(.Range("B1"), .Range("B" & Rows.Count).End(xlUp))
For Each c In r
ListBox1.AddItem c
Next c
End With
End Sub
-------------------------------------
What i'm trying to do is depending on the item selected, modify the cell
next to it
from a text box on the same form.

So if item "CMS-D1" is selected from the list, ("CMS-D1" sits in cell B7), i
need
to change cell C7 with what is is textbox1.

Im having problems getting the cell reference depending on the item selected.

Any help would be appreciated.

Cheer.
Tony B.