Capturing an error and then ignoring it

C

cskgg

Hi everyone, here is my problem:

Can any one pls tell me the code for telling the program to:
SELECT THE FIRST SHEET OF THE WORKBOOK (irresepctive of its name - i.e
the name of the first worksheet may be anything).

Many thanks guys! This forum is cool maaan.

Warm regards
CSKG
 
K

keepITcool

Use the NUMERICAL index..

dim ws as worksheet
dim sh as object
set ws = activeworkbook.worksheets(1)
'if you have charts..
set sh-activeworkbook.sheets(1)

or if you dont need the variable..
activeworkbook.worksheets(1).activate




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


cskgg wrote :
 
Top