So I have my excel sheet automatically increments serial numbers 1, 2, 3.. to infinity based on the number of rows used.
This was obtained by the following command:
So anyhow I now need to introduce a combo box that can look at these numbers and show them all.
I used the following command:
but it doesn't work, it only works with mere characters and not numbers obtained from calculations.. So even though the cell is showing numbers, it can't read them.
This was obtained by the following command:
=IF(B3="","",MAX($A$1:A2)+1)
So anyhow I now need to introduce a combo box that can look at these numbers and show them all.
I used the following command:
VBA Code:
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Sheet1")
Dim i As Integer
Me.ComboBox1.Clear
For i = 3 To sh.Range("A" & Application.Rows.Count).End(xlUp).Row
Me.ComboBox1.AddItem sh.Range("A" & i).Value
Next i