How to handle events in MSFlexGrid Control

G

Guest

I need to handle the event generated by a MSFlexGrid control in an Access VBA project. I tried inserting an MSFlexGrid control on a form then generating a class to handle the events. In the class I hav

Dim WithEvents m_FG As MSFlexGri

Public Sub Iinit(FG As MSFlexGrid
'Set m_FG = F
EndSu

In the form I have a MSFlexGrid control named FormFlexGrid and the following cod

Dim FGControl as myFlexGri

Set myFlexGrid=new FGContro

myFlexGrid.Init FormFlexGrid <-- this causes an error as a type mismatch ??

So I can't even get to the real work here. Does anyone know how to properly subclass an active x control and handle its events in a VBA project. More specifically the MSFlexGrid control in an Access 2002 project?? BTW this same code works if the object is a combo box so my presumtion is that it has to do with the active x contro

Thank
Charli
 
G

Guest

Figured this out myself for those interested

If the control is an ActiveX control then its in a container of type Control and the member that has the ActiveX value is objec

So to call a function with prototyp

Sub Init(FG as MSFlexGrid

Using a procedure on the form in which a MSFlexGrid object works you must use the following synta

Init FormFlexGrid.Objec

I guess this makes sense !@#$%%^O
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top