Right. You can do something like:
On Error Resume Next AddIns("Solver Add-in").Installed = True If Err <> 0 Then MsgBox "Excel's Solver Add-in is not installed, " & _ "You must install it from the Excel installation CD " & _ "for this macro to function properly.", vbCritical, "Error" Exit Sub End If On Error GoTo 0