f2e4
05-14-2008, 02:53 AM
Hi People
I have a row of dates that I need to transpose into a combobox
As this row is undefined in length (will vary as time goes on), i ca not put down a range.
i am using the following code....which works!! up to a point.
ActiveSheet.ComboBox9.Clear
Set subs = Worksheets("workload").Range("I3")
col = subs.CurrentRegion.End(xlToRight).Column
For x = 9 To col
ActiveSheet.ComboBox9.AddItem Worksheets("Workload").Cells(3, x).Value
Next
The only problem I have is that the above code picks up 'everything' from I3 to the right INCLUDING all the blanks after my data ends.
Does anyone know how to select only up to the last populated cell
Thanks
F
I have a row of dates that I need to transpose into a combobox
As this row is undefined in length (will vary as time goes on), i ca not put down a range.
i am using the following code....which works!! up to a point.
ActiveSheet.ComboBox9.Clear
Set subs = Worksheets("workload").Range("I3")
col = subs.CurrentRegion.End(xlToRight).Column
For x = 9 To col
ActiveSheet.ComboBox9.AddItem Worksheets("Workload").Cells(3, x).Value
Next
The only problem I have is that the above code picks up 'everything' from I3 to the right INCLUDING all the blanks after my data ends.
Does anyone know how to select only up to the last populated cell
Thanks
F