Karen,
Does the strsheetname value have the ".xls" extension? It should if it
doesn't.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)
"KarenH" wrote in message
...
Why would I get a "subscript out of range" error on the following?
? workbooks(strsheetname).Sheets.Count
This is within a procedure where strsheetName is a string variable passed
in
that is the name of the workbook.
Thanks.