View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default change by value in drop down list

Hi Debra,

In Excel 97, data validation will fire the change event if the list is
delimited.


So it does, wish I had known that years ago! I suppose because I've never
used a delimited list with DV.

Had a quick look and it seems viable to programatically convert the List
from that in a range to a delimited list, in (say) the workbook open event
if version is Excel 97. Only problem is if the length is more than 255 then
crash occurs when Add'ing DV with the long list. But 255 is often enough for
a DV list.

Regards,
Peter T

Peter T wrote:
If you are using Excel 97 data validation change does not fire an event.

If that's what you're using requires radical workaround. Maybe simulate

with
a Combobox from the Controls Toolbox and link your code into that. Or

link
the changing value to a formula and look at the Calculation event.

Update
and compare a module level variable, or static variable within the

event
code, to the changing value.

Regards,
Peter T

Regards,
Peter T
"choice" wrote in message
...

i have a data validation with a drop down list, and

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = Range("d2").Address Then
Range("d5").Value = Range("b1").Value
Range("f5").Value = Range("c1").Value
Application.Run "changesquare"
End If
End Sub

however when i drop down the list and select a different value nothing


happens

any ideas?

thanks in advance






--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html