View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_529_] Leith Ross[_529_] is offline
external usenet poster
 
Posts: 1
Default Adding WorksheetData to a ComboBox on a form?


Hello Jeff,

To start with, you have your code in the wrong event. It should b
placed in the Private Sub UserForm_Activate() event module.

_______________________________

Private Sub UserForm_Activate()
Dim i As Long
Dim S1 As Worksheet

Set S1 = Sheets("DataEntry")

For i = 2 To S1.Cells(Rows.Count, 1).End(xlUp).Row
UserForm6.ComboBox1.AddItem S1.Cells(i, 1).Value
Next i
End Sub
_______________________________

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=50882