Option Strict On Disallows Late Binding
Does anyone know how to resolve this error?
Option Strict On Disallows Late Binding
My code is as follows:
Private Sub Data_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles btnGetData.Click, _
btnSetData.Click
Select Case sender.name
Case btnGetData.Name
fileData = New FileData
fileData.FileName = CurDir() & "Test.txt"
txtFileData.Text = fileData.GetData()
fileData = Nothing
Case btnSetData.Name
Remainder of code goes here.....
The error occurs on this statement:
"Select Case sender.name"
Any help would be appreciated!
Thanks,
Bob
p.s. I tried using ctype and directCast on the Sender.Name reference, but I was not able to succesfully convert it.