Option Explicit
Function FileExists(sFileName$) As Boolean
On Error Resume Next
FileExists = IIf(Dir(Trim(sFileName)) <> "", True, False)
End Function
Public Function IsAppPresent(strSubKey$, strValueName$) As Boolean
IsAppPresent = CBool(Len(GetRegString(HKEY_CLASSES_ROOT, strSubKey, strValueName)))
End Function
Private Sub Command1_Click()
Label1.Caption = "Access " & IsAppPresent("Access.Database\CurVer", "")
Label2.Caption = "Excel " & IsAppPresent("Excel.Sheet\CurVer", "")
Label3.Caption = "PowerPoint " & IsAppPresent("PowerPoint.Slide\CurVer", "")
Label4.Caption = "Word " & IsAppPresent("Word.Document\CurVer", "")
End Sub