Ken
This error happens when there is no Workbook open in the XL application.
You can check using the following code
If ActiveWorkbook Is Nothing Then
MsgBox "Macro will work on open workbooks!", vbInformation
End
End If
Cheers,
Shasur
http://www.vbadud.blogspot.com