Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft forms 2.0 and Combobox

Status
Not open for further replies.

rohini21

Programmer
Jan 19, 2003
49
0
0
NZ
Hi there,

I tried using Combobox from micrsoft forms 2.0 activex. I did something like this

dropped a combobox from activex list on the form and wrote this

dim lcbObject as combobox
set lcbObject = cboEmpStatus.object

bla
bla
bla


It fails on

set lcbObject = cboEmpStatus.object

saying type mismatch.

Please help
 
Hi,

What do you want to do with the ComboBox control in this code? You do not have to set an object variable for it, you can refer to it directly, depending on what properties methods you want to access:
Code:
[COLOR=blue]
cboEmpStatus.Enabled = False
[/color]
Dean.
 
With reference to Forms 2.0, you have two classes of combo boxes, so to be exact:

Dim lcbObject As MSForms.ComboBox
or
Dim lcbObject As Access.ComboBox

Without library name you will have access combo, due to higher priority reference.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top