ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ComboBox.RowSource? (https://www.excelbanter.com/excel-programming/386001-combobox-rowsource.html)

JimAnAmateur[_2_]

ComboBox.RowSource?
 
Strange: When I draw a ComboBox on a UserForm, I can specify RowSource for
this control (to let it read data from a given range in a worksheet).
However, when I draw a ComboBox directly in a worksheet, I don't see
RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim



Coza

ComboBox.RowSource?
 
Try a ControlBox Combobox instead


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify RowSource for
this control (to let it read data from a given range in a worksheet).
However, when I draw a ComboBox directly in a worksheet, I don't see
RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim




Nick Hodge

ComboBox.RowSource?
 
Jim

It's ListFillRange on the ActiveX control in Excel. The difference is
because UserForms are part of Office rather than specific to Excel

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify RowSource for
this control (to let it read data from a given range in a worksheet).
However, when I draw a ComboBox directly in a worksheet, I don't see
RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim



JimAnAmateur[_2_]

ComboBox.RowSource?
 
Thanks, Nick!

But, no matter what I write (in the field "ListFillRange"), it's just not
recorded (the field gets empty right away).
What is the syntax for this field? I tried e.g. "Sheet1!a1:a10" (with and
without quotation marks), ...

br Jim

"Nick Hodge" skrev i melding
...
Jim

It's ListFillRange on the ActiveX control in Excel. The difference is
because UserForms are part of Office rather than specific to Excel

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify RowSource
for this control (to let it read data from a given range in a worksheet).
However, when I draw a ComboBox directly in a worksheet, I don't see
RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim





JLGWhiz

ComboBox.RowSource?
 
Jim, If you use the Control Toolbox to create your combo box, you will need
to be in design mode to access the properties box. Otherwise you can use the
AddItem or List method to fill the box.

If you use the Forms Toolbar to create the combo box then you will need to
use the format control option on the Forms toolbar and on the Control tab you
can specify the range for the row source and links.

"JimAnAmateur" wrote:

Thanks, Nick!

But, no matter what I write (in the field "ListFillRange"), it's just not
recorded (the field gets empty right away).
What is the syntax for this field? I tried e.g. "Sheet1!a1:a10" (with and
without quotation marks), ...

br Jim

"Nick Hodge" skrev i melding
...
Jim

It's ListFillRange on the ActiveX control in Excel. The difference is
because UserForms are part of Office rather than specific to Excel

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify RowSource
for this control (to let it read data from a given range in a worksheet).
However, when I draw a ComboBox directly in a worksheet, I don't see
RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim






Nick Hodge

ComboBox.RowSource?
 
Jim

In the property enter

Sheet1!$A$1:$A$10

No quotes but you need the absolute reference
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Thanks, Nick!

But, no matter what I write (in the field "ListFillRange"), it's just not
recorded (the field gets empty right away).
What is the syntax for this field? I tried e.g. "Sheet1!a1:a10" (with and
without quotation marks), ...

br Jim

"Nick Hodge" skrev i melding
...
Jim

It's ListFillRange on the ActiveX control in Excel. The difference is
because UserForms are part of Office rather than specific to Excel

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify RowSource
for this control (to let it read data from a given range in a
worksheet). However, when I draw a ComboBox directly in a worksheet, I
don't see RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim






JimAnAmateur[_2_]

ComboBox.RowSource?
 
Coza,

I don't find ControlTollbox. I am using Excel 2003.
Where do I find it?

br Jim

"JLGWhiz" skrev i melding
...
Jim, If you use the Control Toolbox to create your combo box, you will
need
to be in design mode to access the properties box. Otherwise you can use
the
AddItem or List method to fill the box.

If you use the Forms Toolbar to create the combo box then you will need to
use the format control option on the Forms toolbar and on the Control tab
you
can specify the range for the row source and links.

"JimAnAmateur" wrote:

Thanks, Nick!

But, no matter what I write (in the field "ListFillRange"), it's just not
recorded (the field gets empty right away).
What is the syntax for this field? I tried e.g. "Sheet1!a1:a10" (with and
without quotation marks), ...

br Jim

"Nick Hodge" skrev i melding
...
Jim

It's ListFillRange on the ActiveX control in Excel. The difference is
because UserForms are part of Office rather than specific to Excel

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify RowSource
for this control (to let it read data from a given range in a
worksheet).
However, when I draw a ComboBox directly in a worksheet, I don't see
RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim








JimAnAmateur[_2_]

ComboBox.RowSource?
 
Nick,

I did as you describe, but still, the field returned empty right away.
I also did it in macro, e.g. ComboBox1.ListFillRange = "Sheet1!$A$1:$A$10",
and it didn't work either (the list remains empty).

More problems: ActiveX controls that I add on my sheet (TreeView,
RichTextBox), no matter how I specify the size (both in properties-windows,
and programmed in macro), they appaer as a little window (not the size I
specified) on the sheet when I reopen the file. I do have a Sub that is
called in Auto_Open, and that "re-draws" the controls on the sheet, but the
controls remains "tiny" on the sheet.

br Jim

"Nick Hodge" skrev i melding
...
Jim

In the property enter

Sheet1!$A$1:$A$10

No quotes but you need the absolute reference
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Thanks, Nick!

But, no matter what I write (in the field "ListFillRange"), it's just not
recorded (the field gets empty right away).
What is the syntax for this field? I tried e.g. "Sheet1!a1:a10" (with and
without quotation marks), ...

br Jim

"Nick Hodge" skrev i melding
...
Jim

It's ListFillRange on the ActiveX control in Excel. The difference is
because UserForms are part of Office rather than specific to Excel

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify RowSource
for this control (to let it read data from a given range in a
worksheet). However, when I draw a ComboBox directly in a worksheet, I
don't see RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim








JimAnAmateur[_2_]

ComboBox.RowSource?
 
I used FormsToolbar first, since there is too little formatting facilities
on FormsToolbar (e.g., font size), I went over to using Control Toolbox.

So:
1) with FormsToolbar I can specify the row source (as you wrote here), but
not tthings like font face/size, ...?
2) with Control Toolbox I could change font face/size, but I (so far) seem
not to be able to specify row source (or ListFillRange).

br Jim

"JLGWhiz" skrev i melding
...
Jim, If you use the Control Toolbox to create your combo box, you will
need
to be in design mode to access the properties box. Otherwise you can use
the
AddItem or List method to fill the box.

If you use the Forms Toolbar to create the combo box then you will need to
use the format control option on the Forms toolbar and on the Control tab
you
can specify the range for the row source and links.

"JimAnAmateur" wrote:

Thanks, Nick!

But, no matter what I write (in the field "ListFillRange"), it's just not
recorded (the field gets empty right away).
What is the syntax for this field? I tried e.g. "Sheet1!a1:a10" (with and
without quotation marks), ...

br Jim

"Nick Hodge" skrev i melding
...
Jim

It's ListFillRange on the ActiveX control in Excel. The difference is
because UserForms are part of Office rather than specific to Excel

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify RowSource
for this control (to let it read data from a given range in a
worksheet).
However, when I draw a ComboBox directly in a worksheet, I don't see
RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim








Dave Peterson

ComboBox.RowSource?
 
If you can change the font using the properties, then you should be able to see
listfillrange. It's about 7 entries below the font on the alphabetic tab.

JimAnAmateur wrote:

I used FormsToolbar first, since there is too little formatting facilities
on FormsToolbar (e.g., font size), I went over to using Control Toolbox.

So:
1) with FormsToolbar I can specify the row source (as you wrote here), but
not tthings like font face/size, ...?
2) with Control Toolbox I could change font face/size, but I (so far) seem
not to be able to specify row source (or ListFillRange).

br Jim

"JLGWhiz" skrev i melding
...
Jim, If you use the Control Toolbox to create your combo box, you will
need
to be in design mode to access the properties box. Otherwise you can use
the
AddItem or List method to fill the box.

If you use the Forms Toolbar to create the combo box then you will need to
use the format control option on the Forms toolbar and on the Control tab
you
can specify the range for the row source and links.

"JimAnAmateur" wrote:

Thanks, Nick!

But, no matter what I write (in the field "ListFillRange"), it's just not
recorded (the field gets empty right away).
What is the syntax for this field? I tried e.g. "Sheet1!a1:a10" (with and
without quotation marks), ...

br Jim

"Nick Hodge" skrev i melding
...
Jim

It's ListFillRange on the ActiveX control in Excel. The difference is
because UserForms are part of Office rather than specific to Excel

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify RowSource
for this control (to let it read data from a given range in a
worksheet).
However, when I draw a ComboBox directly in a worksheet, I don't see
RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim






--

Dave Peterson

JimAnAmateur[_2_]

ComboBox.RowSource?
 
Yes, I do see it, and I can type in a value, but the value just disappears
and the field remains empty.
When I code it in the macro, no effect, the list remains empty. Strange.

"Dave Peterson" skrev i melding
...
If you can change the font using the properties, then you should be able
to see
listfillrange. It's about 7 entries below the font on the alphabetic tab.

JimAnAmateur wrote:

I used FormsToolbar first, since there is too little formatting
facilities
on FormsToolbar (e.g., font size), I went over to using Control Toolbox.

So:
1) with FormsToolbar I can specify the row source (as you wrote here),
but
not tthings like font face/size, ...?
2) with Control Toolbox I could change font face/size, but I (so far)
seem
not to be able to specify row source (or ListFillRange).

br Jim

"JLGWhiz" skrev i melding
...
Jim, If you use the Control Toolbox to create your combo box, you will
need
to be in design mode to access the properties box. Otherwise you can
use
the
AddItem or List method to fill the box.

If you use the Forms Toolbar to create the combo box then you will need
to
use the format control option on the Forms toolbar and on the Control
tab
you
can specify the range for the row source and links.

"JimAnAmateur" wrote:

Thanks, Nick!

But, no matter what I write (in the field "ListFillRange"), it's just
not
recorded (the field gets empty right away).
What is the syntax for this field? I tried e.g. "Sheet1!a1:a10" (with
and
without quotation marks), ...

br Jim

"Nick Hodge" skrev i melding
...
Jim

It's ListFillRange on the ActiveX control in Excel. The difference
is
because UserForms are part of Office rather than specific to Excel

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify
RowSource
for this control (to let it read data from a given range in a
worksheet).
However, when I draw a ComboBox directly in a worksheet, I don't
see
RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim






--

Dave Peterson




Jon Peltier

ComboBox.RowSource?
 
I can't reproduce your problems.

This works for me programmatically:

ActiveSheet.OLEobjects("ListBox2").ListFillRange = "Sheet1!A2:A11"

Manually I can enter A2:A11 without absolute references, with or without the
sheet name, and it works fine.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"JimAnAmateur" wrote in message
...
Nick,

I did as you describe, but still, the field returned empty right away.
I also did it in macro, e.g. ComboBox1.ListFillRange =
"Sheet1!$A$1:$A$10", and it didn't work either (the list remains empty).

More problems: ActiveX controls that I add on my sheet (TreeView,
RichTextBox), no matter how I specify the size (both in
properties-windows, and programmed in macro), they appaer as a little
window (not the size I specified) on the sheet when I reopen the file. I
do have a Sub that is called in Auto_Open, and that "re-draws" the
controls on the sheet, but the controls remains "tiny" on the sheet.

br Jim

"Nick Hodge" skrev i melding
...
Jim

In the property enter

Sheet1!$A$1:$A$10

No quotes but you need the absolute reference
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Thanks, Nick!

But, no matter what I write (in the field "ListFillRange"), it's just
not recorded (the field gets empty right away).
What is the syntax for this field? I tried e.g. "Sheet1!a1:a10" (with
and without quotation marks), ...

br Jim

"Nick Hodge" skrev i melding
...
Jim

It's ListFillRange on the ActiveX control in Excel. The difference is
because UserForms are part of Office rather than specific to Excel

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify RowSource
for this control (to let it read data from a given range in a
worksheet). However, when I draw a ComboBox directly in a worksheet, I
don't see RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim










Nick Hodge

ComboBox.RowSource?
 
Jon

After reading another post from the OP I think these are VB6 controls not
from Excel???

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk

FREE UK OFFICE USER GROUP MEETING, MS READING, 27th APRIL 2007
www.officeusergroup.co.uk

"Jon Peltier" wrote in message
...
I can't reproduce your problems.

This works for me programmatically:

ActiveSheet.OLEobjects("ListBox2").ListFillRange = "Sheet1!A2:A11"

Manually I can enter A2:A11 without absolute references, with or without
the sheet name, and it works fine.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"JimAnAmateur" wrote in message
...
Nick,

I did as you describe, but still, the field returned empty right away.
I also did it in macro, e.g. ComboBox1.ListFillRange =
"Sheet1!$A$1:$A$10", and it didn't work either (the list remains empty).

More problems: ActiveX controls that I add on my sheet (TreeView,
RichTextBox), no matter how I specify the size (both in
properties-windows, and programmed in macro), they appaer as a little
window (not the size I specified) on the sheet when I reopen the file. I
do have a Sub that is called in Auto_Open, and that "re-draws" the
controls on the sheet, but the controls remains "tiny" on the sheet.

br Jim

"Nick Hodge" skrev i melding
...
Jim

In the property enter

Sheet1!$A$1:$A$10

No quotes but you need the absolute reference
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Thanks, Nick!

But, no matter what I write (in the field "ListFillRange"), it's just
not recorded (the field gets empty right away).
What is the syntax for this field? I tried e.g. "Sheet1!a1:a10" (with
and without quotation marks), ...

br Jim

"Nick Hodge" skrev i melding
...
Jim

It's ListFillRange on the ActiveX control in Excel. The difference is
because UserForms are part of Office rather than specific to Excel

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify
RowSource for this control (to let it read data from a given range in
a worksheet). However, when I draw a ComboBox directly in a
worksheet, I don't see RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim











JLGWhiz

ComboBox.RowSource?
 
Jim, when you enter the range in the properties box for ListFillRange do it
like this:

a10:c18

No quotation marks, no dollar signs, no spaces, no nothin except the colon
between the range references. The ListBox is automatically tied to the sheet
you create it on so you don't need the sheet1! reference for the range.

For sizing the controls, use the handles that you see when you right click
on them.
Just grab a node with your mouse pointer (cursor) and stretch the control to
the size you want.

"JimAnAmateur" wrote:

Nick,

I did as you describe, but still, the field returned empty right away.
I also did it in macro, e.g. ComboBox1.ListFillRange = "Sheet1!$A$1:$A$10",
and it didn't work either (the list remains empty).

More problems: ActiveX controls that I add on my sheet (TreeView,
RichTextBox), no matter how I specify the size (both in properties-windows,
and programmed in macro), they appaer as a little window (not the size I
specified) on the sheet when I reopen the file. I do have a Sub that is
called in Auto_Open, and that "re-draws" the controls on the sheet, but the
controls remains "tiny" on the sheet.

br Jim

"Nick Hodge" skrev i melding
...
Jim

In the property enter

Sheet1!$A$1:$A$10

No quotes but you need the absolute reference
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Thanks, Nick!

But, no matter what I write (in the field "ListFillRange"), it's just not
recorded (the field gets empty right away).
What is the syntax for this field? I tried e.g. "Sheet1!a1:a10" (with and
without quotation marks), ...

br Jim

"Nick Hodge" skrev i melding
...
Jim

It's ListFillRange on the ActiveX control in Excel. The difference is
because UserForms are part of Office rather than specific to Excel

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"JimAnAmateur" wrote in message
...
Strange: When I draw a ComboBox on a UserForm, I can specify RowSource
for this control (to let it read data from a given range in a
worksheet). However, when I draw a ComboBox directly in a worksheet, I
don't see RowSource in the Properties-window.

What's wrong? Any suggestions?

br Jim










All times are GMT +1. The time now is 04:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com