Combobox Rowsource

M

Mahal

Hi guys. I'm trying to set the rowsource of my combobox to data on a worksheet. The range of cells I want to refer to is dynamic, but I don't want to refer to a range. Here's what I have and I'm not sure why it's not working:
Dim toEnd As Double

toEnd = 5

Do Until Sheets("Trial Balance").Cells(toEnd, 2) = Empty
toEnd = toEnd + 1
Loop

frmTransEntry.cbx1.RowSource = "'Trial Balance'!b5:b" & toEnd - 1

Any help?
 
G

GS

Hi guys. I'm trying to set the rowsource of my combobox to data on a
worksheet. The range of cells I want to refer to is dynamic, but I
don't want to refer to a range. Here's what I have and I'm not sure
why it's not working: Dim toEnd As Double

toEnd = 5

Do Until Sheets("Trial Balance").Cells(toEnd, 2) = Empty
toEnd = toEnd + 1
Loop

frmTransEntry.cbx1.RowSource = "'Trial Balance'!b5:b" & toEnd - 1

Any help?

I don't see why you can't use the name of the dynamic range since, if
properly defined, it will only contain data within its boundaries.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top