View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Gareth[_3_] Gareth[_3_] is offline
external usenet poster
 
Posts: 109
Default Sheet event doesn't work in '97

Sorry for being thick but a macro which does what and when would the button
be clicked?

"J.E. McGimpsey" wrote in message
...
"In Excel 97, selecting an item from a Data Validation dropdown
listdoes not trigger a change event, unless the list items have been
typed in the Data Validation dialog box. In these versions, you can
add a button to the worksheet, and assign a macro to the button."
--Debra Dalgleish: http://www.contextures.com/xlDataVal08.html#Change




In article ,
"Gareth" wrote:

Can anyone help?

I have the following code which works fine on 2000 but in work we have

'97
and the sheet event doesn't fire when selecting items from a drop down
valuidation list in column F.

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo ws_exit
If Target.Column = 6 Then
If Target.Offset(0, -5).Value <=

Worksheets("Sheet2").Range("A1").Value
Then
If Right(Target.Value, 1) = "^" Then
MsgBox "Error, you must choose one without a roof on!"
End If
ElseIf Target.Offset(0, -5).Value
Worksheets("Sheet2").Range("A1").Value Then
If Right(Target.Value, 1) < "^" Then
MsgBox "Error, you must choose one with a roof on!"
End If
End If
End If
ws_exit:
Application.EnableEvents = True
End Sub

This check is very important, is there any other way to do it?

Thanks in advance.

Gareth