View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
ll ll is offline
external usenet poster
 
Posts: 67
Default listindex and blank rows

On Jun 13, 8:07 pm, JLGWhiz wrote:
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" wrote:
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