Try giving explicit reference of the Workbook to the Worksheets
collection
Something like: Workbooks("1").Worksheets.Count or
Thisworkbook.Worksheets.Count
--
a7n9
------------------------------------------------------------------------
a7n9's Profile:
http://www.excelforum.com/member.php...o&userid=32149
View this thread:
http://www.excelforum.com/showthread...hreadid=562551