lothos12345
Programmer
I have written a program in Visual Basic.NET. Recently one of the requirements is that Option Strict be activated. Now I am having a late binding issue that I cannot resolve. Below is my code:
************************************************************
Private Sub ContextMenu1_clicked(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim sendnoteid As Integer
Dim tParent As String
Dim tchild As String
Dim tnote As String
Dim i As Integer
Try
' get group and replace active row cell with menu option
tnote = UltraGrid1.ActiveRow.Cells(2).Value.ToString
tParent = sender.Parent.Text.ToString ***[Error]
tchild = sender.Text.ToString ***[Error]
'tchild = ContextMenu1.ToString
For i = 0 To UBound(afindtext)
If afindtext(i) = tParent & "*" & tchild Then
UltraGrid1.ActiveRow.Cells(2).Value = Replace(tnote, areplacetext(i), tchild)
i = UBound(afindtext)
UltraGrid1.ActiveRow.Cells(0).Value = True ' if checkbox not checked then check it
End If
Next
Catch ex As Exception
Call errhandler(ex.Message, ex.StackTrace, ex.Source)
End Try
End Sub
***********************************************************
The two statements with the Error next to them are the ones that are giving me the late binding issue. Please any help with this would greatly be appreciated.
************************************************************
Private Sub ContextMenu1_clicked(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim sendnoteid As Integer
Dim tParent As String
Dim tchild As String
Dim tnote As String
Dim i As Integer
Try
' get group and replace active row cell with menu option
tnote = UltraGrid1.ActiveRow.Cells(2).Value.ToString
tParent = sender.Parent.Text.ToString ***[Error]
tchild = sender.Text.ToString ***[Error]
'tchild = ContextMenu1.ToString
For i = 0 To UBound(afindtext)
If afindtext(i) = tParent & "*" & tchild Then
UltraGrid1.ActiveRow.Cells(2).Value = Replace(tnote, areplacetext(i), tchild)
i = UBound(afindtext)
UltraGrid1.ActiveRow.Cells(0).Value = True ' if checkbox not checked then check it
End If
Next
Catch ex As Exception
Call errhandler(ex.Message, ex.StackTrace, ex.Source)
End Try
End Sub
***********************************************************
The two statements with the Error next to them are the ones that are giving me the late binding issue. Please any help with this would greatly be appreciated.