davidkeeling
New member
Hi
My question is why the following doesn't work. Tracing it, it throws no errors, goes through the RaiseEvent but does not go through OnCellValueChanged; so I guess the event is raised but not heard. (It's a console application.)
Thanks, David
My question is why the following doesn't work. Tracing it, it throws no errors, goes through the RaiseEvent but does not go through OnCellValueChanged; so I guess the event is raised but not heard. (It's a console application.)
Thanks, David
VB.NET:
Module Module1
Sub Main()
Dim obj As New Cell
'Dim obj2 As New UIData
obj.change()
End Sub
Public Class Cell
Public Event CellValueChanged(ByVal NewData As String)
Public Sub change()
MsgBox("cell will now simulate a chnage in its value")
RaiseEvent CellValueChanged("fred")
End Sub
End Class
Public Class UIData
Public WithEvents xCell As New Cell
Private Sub OnCellValueChanged(ByVal NewCellValue As String) Handles xCell.CellValueChanged
MsgBox("Msg: " & NewCellValue)
End Sub
End Class
End Module