View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
ex1302[_4_] ex1302[_4_] is offline
external usenet poster
 
Posts: 1
Default Newbie Confused...


Bob,

Thanks I have run the code and it seems to partailly work.....

i ammended it for a test and put a validation list in cell A1, however
i cant seem to get the test message (msgbox "Things changed") on
Workbook_SheetChange to run?

Any ideas?

Andy

Option Explicit
Public WithEvents App As Application
Private Const rngDV As String = "$A$1"

Private Sub Workbook_Open()
Set App = Application
MsgBox "WB OPEN"
End Sub

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)

msgbox "Things changed"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Address = rngDV Then
If Not Intersect(Target, Cells.SpecialCells(xlCellTypeAllValidation))
Is Nothing Then
'do your stuff
End If
End If

ws_exit:
MsgBox "error"
Application.EnableEvents = True
End Sub


--
ex1302
------------------------------------------------------------------------
ex1302's Profile: http://www.excelforum.com/member.php...o&userid=25217
View this thread: http://www.excelforum.com/showthread...hreadid=387079