Change to:
Application.CommandBars(...
It appears that the next level object is the Workbook object (which
does make sense). Therefore, what excel is interpreting is:
Workbook.CommandBars
which is not valid.
Try running this
Msgbox Name
from the workbook code section and you get the workbook name. From the
worksheet code you get the sheet name and from a module you get
nothing...
K
---
Message posted from
http://www.ExcelForum.com/