listindex and blank rows

  • Thread starter Thread starter ll
  • Start date Start date
L

ll

I am working with a spreadsheet whose columns populate a combo box.
There are blank columns between each used column in the spreadsheet.
I am trying to get a count (including the blank columns) of all
columns for use in my code, by using listindex from the combo box.
Also, I would like for the blank columns to be omitted when populating
the combobox. Would this only be possible with two comboboxes (one
visible and one hidden [to generate the actual count])?

Thanks
Louis
 
Is there any reason why

UsedRange.Columns.Count

couldn't be used to get the columns count?

I am not too sure about how to eliminate the blank columns when you
populate, the combo box. I'll have to look that up. Maybe with Union, but
not sure.
 
Is there any reason why

UsedRange.Columns.Count

couldn't be used to get the columns count?

I am not too sure about how to eliminate the blank columns when you
populate, the combo box. I'll have to look that up. Maybe with Union, but
not sure.

ll said:
I am working with a spreadsheet whose columns populate a combo box.
There are blank columns between each used column in the spreadsheet.
I am trying to get a count (including the blank columns) of all
columns for use in my code, by using listindex from the combo box.
Also, I would like for the blank columns to be omitted when populating
the combobox. Would this only be possible with two comboboxes (one
visible and one hidden [to generate the actual count])?
Thanks
Louis

That was a great idea; however, as I need the selected index number
from the combobox, the UsedRange.Columns.Count wouldn't work in this
instance. Or would it? I'm not sure if it would return the total
number..?

Thanks,
Louis
 
Back
Top