ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   referring to worksheet (https://www.excelbanter.com/excel-programming/378582-re-referring-worksheet.html)

Chip Pearson

referring to worksheet
 
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.








All times are GMT +1. The time now is 02:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com