LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default How to tell if sheet exists in closed workbook

I need to find out if a worksheet named Sheet1 exists in a closed workbook.

A search of news groups suggest you can use ADO to find out sheet names in
closed workbooks but I don't need to know the names. I just need to know if
Sheet1 exists in a workbook. If it doesn't exist, that workbook is ignored.
I have other validation code to screen for improper data on closed workbooks
when the name is Sheet1 which is a pretty common name so that part is not a
problem.

My code for reading data from closed workbooks works fine until a workbook
is found that doesn't have a sheet named Sheet1. Then Excel puts up a list
of sheet names for the workbook. I haven't coded for this, don't know how
and don't want to and even though it creates an error eventually that I
handle, it thoroughly confuses Users.

I'd sure like to find some way to query the closed workbook to see if Sheet1
exist. An error returned on a workbook without Sheet1 is fine since that
can be handled.

Ideas would be very greatly appreciated.


 
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
Moving Sheet to Closed Workbook Roger Excel Discussion (Misc queries) 0 January 13th 08 05:16 PM
Help - How to check if value exists in closed workbook? c mateland Excel Programming 3 April 16th 07 03:05 AM
Check if sheet exists in a closed workbook FrigidDigit[_2_] Excel Programming 2 October 25th 05 06:44 AM
Finding the last row in a sheet in a closed workbook. peterv[_2_] Excel Programming 4 August 8th 05 03:22 PM
Import Sheet from Closed Workbook Joe Derr[_2_] Excel Programming 1 May 2nd 05 09:07 AM


All times are GMT +1. The time now is 01:27 PM.

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

About Us

"It's about Microsoft Excel"