The answer is "NOT TO USE the SELECT METHOD". In your code reference
each sheet by its object or Name. Don't use recorded macros without
eliminating all the select properties and activate properties (there are
only a few cases where this may not work).
Selection of TABS slows down the macro and can create errors like you
are finding out. Here are some examples of the correct method of
referencing objects
set bk = workbooks.open(Filename:=Book1.xls)
set sht = bk.sheets("sheet1")
for each sht in bk.sheets
set DataRange = sht.rangge("A1:B100")
--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=170049
Microsoft Office Help