Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default check if a worksheet exist - VBA

Please help.

In VBA, how do I check if a worksheet exists?

Thanks

Warren


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default check if a worksheet exist - VBA

one way:

Dim wkSht As Worksheet
On Error Resume Next
Set wkSht = Worksheets("TargetSheet")
On Error GoTo 0
If Not wkSht Is Nothing Then
'worksheet exists
Else
'worksheet doesn't exist
End If

In article <2ex7b.407150$Ho3.62997@sccrnsc03,
"Warren" wrote:

Please help.

In VBA, how do I check if a worksheet exists?

Thanks

Warren


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
Does worksheet exist BB Ivan Excel Discussion (Misc queries) 1 January 29th 09 10:04 PM
Check for a tab if it is exist Farhad Excel Discussion (Misc queries) 2 December 21st 08 07:31 PM
Check if a value exist in a column DJ Steffo Excel Worksheet Functions 1 January 30th 06 02:37 PM
Does Worksheet Exist BillCPA Excel Discussion (Misc queries) 5 April 19th 05 11:22 PM
Refrencing another cell in a worksheet that "could" exist KimberlyC Excel Worksheet Functions 1 February 7th 05 07:09 PM


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