drodown selection

G

geebee

hi,

i have some code on dropdown change... but noticed that it really doesnt
execute when there is only one value available for selection. like it works
if you have more than one value to be selected, but if there is only one, it
really doesnt trigger anything...

any ideas?

thanks in advance,
geebee
 
O

Otto Moehrbach

You are probably using a Worksheet_Change event macro. Such a macro fires
only if the contents of a cell change. If your drop-down has only one
value, then selecting that one value will not change the contents of the
cell and the macro will not fire. Perhaps a Worksheet_SelectionChange macro
will work for you. HTH Otto
 
G

Gary''s Student

The macro:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub
MsgBox (Target.Value)
End Sub

seems to trap changes to cell A1
even via Data Validation
even if the Validation List is only one item
even if the Validation entry does not actually change the cell
value
 
R

RyanH

If you only have 1 selection in the DropDown Box (ListIndex = 0) then there
is no way to change the ListIndex, thus will not fire the Change_Event.

Maybe you could try the AfterUpdate_Event in your application.

Hope this helps.
 

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

Similar Threads

onCHange event 1
unprotected cells 2
linking pivot table selections 2
cell value 2
pivot table 1
In need of more guidance please.... 10
Userform Listbox selection change 2
Access Cascading combo/query in table/subform 0

Top