View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
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/