ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Form Controls on Worksheet (https://www.excelbanter.com/excel-programming/438582-form-controls-worksheet.html)

H.G. Lamy

Form Controls on Worksheet
 
Hello,

can I use an array as input range for a combo box (I mean form controls, not
ActiveX controls) ?

Kind regards,

H.G. Lamy



Rick Rothstein

Form Controls on Worksheet
 
Can you expand your description for us? Are you asking about doing this in
VB code? When you say "array", do you mean a range of cells or an actual VB
array? If the latter, what data type (Variant, String, etc.) is the array
declared as? And I'm assuming from your brief description that your ComboBox
is on a worksheet and not a UserForm, right?

--
Rick (MVP - Excel)


"H.G. Lamy" wrote in message
...
Hello,

can I use an array as input range for a combo box (I mean form controls,
not ActiveX controls) ?

Kind regards,

H.G. Lamy




H.G. Lamy

Form Controls on Worksheet
 
Rick, thanks,

as you know, there are 2 types of controls available in Excel:

1. good old simple Form controls, and 2. ActiveX controls.

Both types can principally be used on worksheets, but ActiveX controls are
more suited for UserForms, and are less reliable when applied on worksheets
directly.

On my worksheet I need to use the simple combo box (or drop down) from the
forms collection. (The combo box serves to have the user pick one of 12
months).

To make the control work, an "input range", and a "cell link" have to be
assigned - both usually as classic range-addresses on a worksheet.

Because of varying worksheets, I try to replace these 2 range-addresses by a
either defined name, or a constant, or an array, or anything else so as to
avoid range-addresses.

Any idea ?

Kind regards,

H.G. Lamy









"Rick Rothstein" wrote in message
...
Can you expand your description for us? Are you asking about doing this in
VB code? When you say "array", do you mean a range of cells or an actual
VB array? If the latter, what data type (Variant, String, etc.) is the
array declared as? And I'm assuming from your brief description that your
ComboBox is on a worksheet and not a UserForm, right?

--
Rick (MVP - Excel)


"H.G. Lamy" wrote in message
...
Hello,

can I use an array as input range for a combo box (I mean form controls,
not ActiveX controls) ?

Kind regards,

H.G. Lamy






H.G. Lamy

Form Controls on Worksheet
 
Rick, thanks,

as you know, there are 2 types of controls available in Excel:

1. good old simple Form controls, and 2. ActiveX controls.

Both types can principally be used on worksheets, but ActiveX controls are
more suited for UserForms, and are less reliable when applied on worksheets
directly.

On my worksheet I need to use the simple combo box (or drop down) from the
forms collection. (The combo box serves to have the user pick one of 12
months).

To make the control work, an "input range", and a "cell link" have to be
assigned - both usually as classic range-addresses on a worksheet.

Because of varying worksheets, I try to replace these 2 range-addresses by a
either defined name, or a constant, or an array, or anything else so as to
avoid range-addresses.

Any idea ?

Kind regards,

H.G. Lamy









"Rick Rothstein" wrote in message
...
Can you expand your description for us? Are you asking about doing this in
VB code? When you say "array", do you mean a range of cells or an actual
VB array? If the latter, what data type (Variant, String, etc.) is the
array declared as? And I'm assuming from your brief description that your
ComboBox is on a worksheet and not a UserForm, right?

--
Rick (MVP - Excel)


"H.G. Lamy" wrote in message
...
Hello,

can I use an array as input range for a combo box (I mean form controls,
not ActiveX controls) ?

Kind regards,

H.G. Lamy








All times are GMT +1. The time now is 05:24 PM.

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