W
wm
Hi,
I am using VBA to do the following
Dim gc As GridControl
Dim gv As GridView
Set gc = GUIObject.Object
Set gv = gc.MainView
Basically, in the last line of the code above, gc.MainView returns an
object of type BaseView (GridView is derived from BaseView). This would
work in VB, but it does not work in VBA because it is failing to cast
BaseView (which is the return value of gc.MainView) to GridView (which
is the type of gc).
Is there a way in VBA to explicitly cast BaseView to GridView so that
the piece of code above would work?
Thanks a lot for you input.
I am using VBA to do the following
Dim gc As GridControl
Dim gv As GridView
Set gc = GUIObject.Object
Set gv = gc.MainView
Basically, in the last line of the code above, gc.MainView returns an
object of type BaseView (GridView is derived from BaseView). This would
work in VB, but it does not work in VBA because it is failing to cast
BaseView (which is the return value of gc.MainView) to GridView (which
is the type of gc).
Is there a way in VBA to explicitly cast BaseView to GridView so that
the piece of code above would work?
Thanks a lot for you input.