Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default WorkSheet Present

Is there a way to check to see if a worksheet is present in a workbook?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default WorkSheet Present

Dim sh as Worksheet
On error resume next
set sh = Workbooks("BookA.xls").Worksheets("Sheet9")
On error goto 0
if sh is nothing then
msgbox "Sheet9 not in BookA.xls"
else
msgbox "Sheet9 was found in BookA.xls"
End If

--
Regards,
Tom Ogilvy


"Dthmtlgod" wrote in message
...
Is there a way to check to see if a worksheet is present in a workbook?




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
Net Present Value Question ktbull Excel Worksheet Functions 3 August 7th 09 07:01 PM
How to present a form instead of the worksheet Parvaiz Excel Discussion (Misc queries) 2 February 20th 09 04:45 PM
net present value Frank D Excel Worksheet Functions 1 August 15th 06 04:23 AM
Net Present Value A Razzak New Users to Excel 1 January 4th 06 10:05 AM
Present Value DME New Users to Excel 1 February 4th 05 05:34 PM


All times are GMT +1. The time now is 04:53 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"