PC Review


Reply
Thread Tools Rate Thread

Combobox.DropDown not working

 
 
Corey ....
Guest
Posts: n/a
 
      7th Jul 2008
Why does the Combobox not DropDown with the below?


If ComboBox2.Value <> Sheets("References").Range("A2").Value Then
ComboBox23.Enabled = False
If ComboBox2.Value = Sheets("References").Range("A2").Value Then
ComboBox23.Enabled = True
ComboBox23.DropDown
End If


 
Reply With Quote
 
 
 
 
Tim Zych
Guest
Posts: n/a
 
      7th Jul 2008
Maybe the datatypes are different? If so, here's one way to work around:


If CStr(ComboBox2.Value) = CStr(Sheets("References").Range("A2").Value) Then


--
Tim Zych
www.higherdata.com
Compare data in worksheets and find differences with Workbook Compare
A free, powerful, flexible Excel utility

"Corey ...." <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Why does the Combobox not DropDown with the below?
>
>
> If ComboBox2.Value <> Sheets("References").Range("A2").Value Then
> ComboBox23.Enabled = False
> If ComboBox2.Value = Sheets("References").Range("A2").Value Then
> ComboBox23.Enabled = True
> ComboBox23.DropDown
> End If
>



 
Reply With Quote
 
Doug Glancy
Guest
Posts: n/a
 
      7th Jul 2008
Corey,

I don't know if you pasted the code straight from your program, but as it is
it won't compile. You don't have an End If for your first If. It looks
like it should really be an If Then Else construct.

hth,

Doug

"Corey ...." <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Why does the Combobox not DropDown with the below?
>
>
> If ComboBox2.Value <> Sheets("References").Range("A2").Value Then
> ComboBox23.Enabled = False
> If ComboBox2.Value = Sheets("References").Range("A2").Value Then
> ComboBox23.Enabled = True
> ComboBox23.DropDown
> End If
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
combobox.dropdown event not working after error perlyman Microsoft Access Form Coding 0 29th Mar 2010 04:43 PM
ActiveX Dropdown Combobox Not Working Kevin Hendrawan Microsoft Excel Discussion 2 24th Aug 2009 08:32 AM
combobox.dropdown not working properly =?Utf-8?B?RG9ubmE=?= Microsoft Access Forms 0 19th Apr 2005 04:24 AM
Re: Bug: Combobox.dropdown = True during Form.Load event handler causes listbox to be disabled, even though combobox is Enabled. Herfried K. Wagner [MVP] Microsoft Dot NET Framework Forms 0 12th Feb 2004 10:00 PM
Bug: Combobox.dropdown = True during Form.New() causes listbox to be disabled, even though combobox is Enabled. =?Utf-8?B?UmF0a2lsZXk=?= Microsoft Dot NET Framework Forms 1 12th Feb 2004 09:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:43 AM.