yep on a VB form accessing the worksheet data, sorry. It cuurently
works on a column on the same sheet however when I'm trying utilise it
on another column it's failing.
here's the code
Private Sub UserForm_Initialize()
Dim WeekList As String, icount As Integer
icount = 2
While Worksheets("Variables").Range("A" & icount).Value <> ""
WeekList = Worksheets("Variables").Range("A" & icount).Value
cboWeek.AddItem WeekList
icount = icount + 1
Wend
End Sub
¤ yep on a VB form accessing the worksheet data, sorry. It cuurently
¤ works on a column on the same sheet however when I'm trying utilise it
¤ on another column it's failing.
¤
¤ here's the code
¤
¤
¤ Private Sub UserForm_Initialize()
¤
¤
¤ Dim WeekList As String, icount As Integer
¤
¤ icount = 2
¤
¤ While Worksheets("Variables").Range("A" & icount).Value <> ""
¤
¤ WeekList = Worksheets("Variables").Range("A" & icount).Value
¤
¤ cboWeek.AddItem WeekList
¤
¤ icount = icount + 1
¤
¤ Wend
¤
¤ End Sub
OK, so it looks like an Excel (VBA) Form. Are you getting an error when using a different column?
Paul
~~~~
Microsoft MVP (Visual Basic)
Steven - 09 Dec 2005 14:04 GMT
Yep, but it's ok, I've solved it, I just reset icount back to 2 when
looking at the new column in the new range (it's always something
simple isn't? Thanks for your help!!
Steven - 09 Dec 2005 14:04 GMT
Yep, but it's ok, I've solved it, I just reset icount back to 2 when
looking at the new column in the new range (it's always something
simple isn't? Thanks for your help!!