what an idiot lol for some reason i thought i need to have it as the name of the actual userfom, thanks very much for your help i did use initialize too just for some reason i typed activate on here.
could you possibly help with another issue, as you can see i am still learning vb.
i have another combobox that will collect its data from a list on a sheet, the problem i have is, is that the list will keep growing so i cant use range A1:A10 say as it will depend on how many items have been added to the list at any 1 time.
Perhaps something like the following in your Userform initialize procedure
Dim RngToAdd As Range, oC As Range
Dim Ws1 As Worksheet
Set Ws1 = Worksheets("Sheet1")
Set RngToAdd = Ws1.Range(Ws1.Cells(1, 1), Ws1.Cells(Ws1.Rows.Count, 1).End(xlUp))
For Each oC In RngToAdd
This code will set the RngToAdd to the range A1 to the last cell in column A (from the bottom up).
works a treat thank you very much, just a quick addition, i also have a text box that i want to look up the same list but then add the next number in the box. eg, the list will have 1, 2, 3, 4, 5 and i want the text box to display 6
If you are talking about Mordred's code then you would simply change the "Cell(<Row>,<Column>) Values.
Cells in this case defines a single Cell. Two of them defines a Range.
Dim nRow as integer
Dim nCol as integer
nRow = 3
nCol = 2 'Column B
Set RngToAdd = Ws1.Range(Ws1.Cells(nRow nCol), Ws1.Cells(Ws1.Rows.Count, nCol).End(xlUp))
The Ws1.Cells(Ws1.Rows.Count, nCol).End(xlUp))
is returning the last cell used in nCol. Very much like you would do manually.
Click in the bottom most cell of column 2. Press End then the Up arrow.
Excel should move to the last used cell in column 2.
__________________ Burn the land and boil the sea
You can't take the sky from me