View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
NFL NFL is offline
external usenet poster
 
Posts: 31
Default Creating a List using a Form

I got it figured out ... here's the code... Thank you again for your help!!!

Private Sub OKButton_Click()
Sheets("Sheet1").Range("E5") = Me.ListBox1.Value
CSE_List.Hide
End Sub

"OssieMac" wrote:

See if the following examples help.

Private Sub ListBox1_AfterUpdate()
'Place the ListIndex into cell a6
Sheets("Sheet1").Range("A6") = ListBox1.ListIndex
End Sub

Private Sub ListBox1_Enter()
ListBox1.ColumnCount = 1
ListBox1.RowSource = "Sheet1!E81:E90"
ListBox1.ControlSource = "Sheet1!E5"
End Sub


--
Regards,

OssieMac


"NFL" wrote:

It's my understanding that you can not expand a list using a drop-down menu
using data validation.


The list I like to show on the form is cell range E1:E90 (all in one column).

I looked at Microsofts help menu and tried to follow the pattern and its not
working.

Private Sub ListBox1_Click()

Sheets("Sheet1").Select
ListBox1.ColumnCount = 1
ListBox1.RowSource = "e81:e90"


ListBox1.ControlSource = "E5"
'Place the ListIndex into cell a6
ListBox1.BoundColumn = 0
End Sub

Thank you for your help!