Click to See Complete Forum and Search --> : FlexGrid ByRef


Step
March 26th, 2001, 07:16 AM
Hello, I do have a control with a msflexgrid on it. I do want to give a ref to a class module but I do not really know how to do it:

UserControl:
Call myClassModule.SomeMethod(myFlexGrid)

MyClassModule:
Public Sub SomeMethod(myRefToMSFlexGrid As MSFlexGrid)

If I do make it this way, i do get an error (private object-modules...) , but if I change the MyClassModule to:
Public Sub Init(theControl As Object)
there is no error and it does work!
But I do not want to use "As Object". Does someone has an answer?

THANKS!!!

Hari Prasad
May 31st, 2001, 06:41 AM
Hi,
Even I have observed the same kind of behavior. I think classes normally supports only late binding. There does not seems to be a work around for this other than declaring it as object....

Hari