"rawCoder" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> If I took your question correctly.
>
> In case you have no 'shared' sub , you can easily declare a variable of
> any
> class on class level and access it in any sub.
>
> Public Class Class1
> Private x as Class2
> Private Sub MySub()
> x.foo()
> End Sub
> End Class
> '( NOTE: Uncompiled Code)
This code will not work, it will throw the error I mentioned earlier. Also,
foo() is in Class1, not Class2. My scenario looks more like this;
Public Class Class1
Private x as Class1
Private Sub MySub()
x.foo() 'Error occurs here
End Sub
End Class
Thanks,
Brett
|