.net – How to find out Activex Controls from MS Access DB forms using vb.net

ms-accessvb.net

I am developing a Tool in vb.net and need find out Activex Controls from MS Access DB forms. I am able to conut number of controls in form, but unable to get the Activex Controls only from the form. Can any one have any idea how to achieve this, please suggest.

Best Answer

Can you access the controltype property? If so, I cannot help with vb.net, but here is some VBA that may help.

ActiveXCount = 0
For Each ctl In Screen.ActiveForm
    If ctl.ControlType = 119 Then 'Custom control'
        'Debug.Print ctl.Class'
        ActiveXCount = ActiveXCount + 1
    End If
Next