+1  A: 

One possibility is to check for the presence of VBE6.DLL in C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6. Or poke about in the registry looking for references to that DLL or the string VBA.

Note that this location/file name might be different for Office 2010 as there are some changes in the VBA editor.

Tony Toews
A: 

Why don't you try a function like this... found here

Option Explicit
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long

Private Sub cmdCheck_Click()
MsgBox "Exist ???    =" & CheckForComponent("user32.dll")
End Sub

Private Function CheckForComponent(ComPath As String) As Boolean
Dim Ret As Long
Ret = LoadLibrary(ComPath)
FreeLibrary Ret

If Ret = 0 Then
        CheckForComponent = False
    Else
        CheckForComponent = True
End If

End Function 
Anonymous Type