Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formula referring to a worksheet Nicawette Excel Worksheet Functions 4 August 6th 09 09:54 AM
Referring to a Worksheet with a variable donbowyer Excel Programming 7 September 19th 06 12:49 AM
referring a worksheet lazmanyak Excel Worksheet Functions 1 July 23rd 05 02:55 PM
referring to other worksheet Geetu M Excel Worksheet Functions 2 March 29th 05 09:37 PM
Referring to a worksheet using variable WSF Excel Programming 5 January 20th 04 03:16 PM


All times are GMT +1. The time now is 10:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"