public function IsRegistered(byval 控件名 as string) as boolean
'其中控件名:OCXLib.ControlName
dim oCheckup as object
' Check whether the activeX control ControlName is installed and registered.
Set oCheckup = CreateObject(控件名)
IsRegistered= (Err.Number = 0)
end function
Private Sub Command1_Click()
If IsRegistered("MSFlexGridLib.MSFlexGrid.1") Then
MsgBox "MSFlexgrid已注册"
Else
MsgBox "MSFlexgrid为注册"
End If