Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default drodown selection

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default drodown selection

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
"geebee" (noSPAMs) wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default drodown selection

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
--
Gary''s Student - gsnu200800


"geebee" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default drodown selection

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.
--
Cheers,
Ryan


"geebee" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Selection - Paste Selection - Delete Selection Uninvisible Excel Programming 2 October 25th 07 01:31 PM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Combo Box selection only shows bound column info after selection made. Coby Excel Programming 1 October 18th 07 02:04 AM
Object Type of a selection... counting rows in a selection Acid-Sky[_2_] Excel Programming 3 August 23rd 05 09:53 AM
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM


All times are GMT +1. The time now is 09:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"