Click here to Skip to main content
15,891,529 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: error in vb.net Pin
break_day17-Dec-07 2:04
break_day17-Dec-07 2:04 
GeneralRe: error in vb.net Pin
CKnig17-Dec-07 2:19
CKnig17-Dec-07 2:19 
GeneralRe: error in vb.net Pin
Paul Conrad23-Dec-07 14:05
professionalPaul Conrad23-Dec-07 14:05 
GeneralAdd value and text in combobox Pin
yesu prakash15-Dec-07 21:28
yesu prakash15-Dec-07 21:28 
GeneralRe: Add value and text in combobox Pin
Bassam Saoud16-Dec-07 1:58
Bassam Saoud16-Dec-07 1:58 
GeneralAssinging values to Array Pin
sjs4u15-Dec-07 21:01
sjs4u15-Dec-07 21:01 
GeneralRe: Assinging values to Array Pin
Bassam Saoud16-Dec-07 2:05
Bassam Saoud16-Dec-07 2:05 
GeneralLate Binding Issue Pin
Georg Kohler15-Dec-07 18:25
Georg Kohler15-Dec-07 18:25 
Can Somebody help me here Smile | :)
I have written an application for two different motion controllers
- The code for each controller is placed in it's own module with identical
subs

Depending on the controller selected it will execute the appropriate code

Here is the problem .. after setting the project to OPTION STRICT = ON
I get the late binding not allowed message and I just can not get it fixed Smile | :)

Below is a sample code that should help understand my issue easier (I l know it's an easy thing - I just can not figure it out)

It's important for me that the Variable [SelectedController] that holds the object to the selected module is accessible throughout the whole project !
PS the code below doesn’t work = The variable [SelectedController] is not accessible outside the subs !

Where I try to call the actual subroutine is where I get the late binding error
Example : SelectedController.test()
Thanks

Georg


Public Module DECLARE_VARAIBLES
Public SelectedController As Object ' selected controller
End Module


Public Class Form1
Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim SelectedController As New ControllerA
Display_Controller()
End Sub

Public Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim SelectedController As New ControllerB
Display_Controller()
End Sub

Private Sub Display_Controller()
'**************
' HERE IS WHERE I USUALLY RUN INTO MY LATE BINDING ISSUE
SelectedController.test()
End Sub
End Class


Public Class ControllerA
Public Sub test()
MsgBox("running Controller A")

End Sub
End class


Public Class ControllerB
Public Sub test()
MsgBox("running Controller B")

End Sub
End Class
GeneralRe: Late Binding Issue Pin
CKnig16-Dec-07 18:36
CKnig16-Dec-07 18:36 
GeneralRe: Late Binding Issue Pin
Georg Kohler16-Dec-07 19:47
Georg Kohler16-Dec-07 19:47 
Generalmonitor clients on a network Pin
NEO198615-Dec-07 8:49
NEO198615-Dec-07 8:49 
GeneralListView Pin
yesu prakash15-Dec-07 3:54
yesu prakash15-Dec-07 3:54 
GeneralRe: ListView Pin
pmarfleet15-Dec-07 6:54
pmarfleet15-Dec-07 6:54 
GeneralRe: ListView Pin
yesu prakash15-Dec-07 16:24
yesu prakash15-Dec-07 16:24 
GeneralRe: ListView Pin
yesu prakash15-Dec-07 16:28
yesu prakash15-Dec-07 16:28 
GeneralRe: ListView Pin
Paul Conrad15-Dec-07 9:10
professionalPaul Conrad15-Dec-07 9:10 
GeneralRe: ListView Pin
yesu prakash15-Dec-07 16:28
yesu prakash15-Dec-07 16:28 
GeneralRe: ListView Pin
Paul Conrad16-Dec-07 1:58
professionalPaul Conrad16-Dec-07 1:58 
GeneralRe: ListView Pin
yesu prakash16-Dec-07 2:25
yesu prakash16-Dec-07 2:25 
GeneralRe: ListView Pin
Paul Conrad23-Dec-07 14:06
professionalPaul Conrad23-Dec-07 14:06 
Questionpong video game Pin
Cedrickdeorange15-Dec-07 2:48
Cedrickdeorange15-Dec-07 2:48 
AnswerRe: pong video game Pin
Matthew Butler15-Dec-07 3:16
Matthew Butler15-Dec-07 3:16 
QuestionPowerpoint sound problem (vb.net) Pin
sbkk14-Dec-07 22:16
sbkk14-Dec-07 22:16 
GeneralPowerpoint sound problem Pin
sbkk14-Dec-07 22:14
sbkk14-Dec-07 22:14 
GeneralRe: Powerpoint sound problem Pin
Dave Kreskowiak15-Dec-07 5:18
mveDave Kreskowiak15-Dec-07 5:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.