LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Test for Worksheet Exists

You've got it... nice work :)

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"bcmiller " wrote in message
...
Case Closed:

I just need to take your code to the next step and now it works.

Baically, use bln in an if statement to determine whether to proceed
with the code execution or to generate an error report with all the
items that had no corresponding sheet and could not be processed.
Thanks for the assistance.

Final Code:

For i = 0 To CCListLength - 1
Set ExpSheet = wkb.Worksheets(CostCentreList(i))
bln = (Err.Number = 0)
On Error GoTo 0
If bln = True Then

Many appreciations,

BC


---
Message posted from http://www.ExcelForum.com/





 
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
Test if file exists Daniel Bonallack Excel Discussion (Misc queries) 2 May 4th 09 04:19 PM
Test if folder exists, create if it doesn't? 43fan Excel Programming 1 March 1st 04 04:31 PM
Test if a folder exists, create if it doesn't? 43fan Excel Programming 3 March 1st 04 02:59 PM
Test if a folder exists Jeff Marshall Excel Programming 6 September 30th 03 05:21 PM
Test to see if a worksheet exists thanks, Chip CT[_2_] Excel Programming 0 August 22nd 03 03:17 AM


All times are GMT +1. The time now is 03:36 PM.

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"