3. Use an error trap to make sure that Excel (I assume that's what you're
automating) is actually installed before you start doing anything serious
(just a simple on error trap just after you perform the CreateObject should
do it).
4. Make sure there aren't any dialogs open in Excel that could mess up your
Automation.
This is the check I use in Word...
Private Function IsWordAvailable(oWord As Word.Application) As Boolean
Dim lngAddinCount As Long
On Error GoTo ErrHandler
IsWordAvailable = True
lngAddinCount = oWord.AddIns.Count
On Error GoTo 0
Exit Function
ErrHandler:
MsgBox "There appears to be a dialog box open in Word." & vbCr & vbCr & "You
should close down any open dialog screens before attempting to create a
document.", vbInformation, "Automation Error"
IsWordAvailable = False