first, I hatte the ON Error statements. I think it bad programming
practive to use an error to find a non-error condition. To test for
sheets I often use a for loop
LastSht = sheets.count
for shtCount = LastSht to 1 step -1
Set Sht = sheets(Shtcount)
If sht.name < "Options" And sht.name < "xPlot" Then
'add your code here
end if
next ShtCount
To get an Array of sheet names use the code below. there isn't a good
way of getting an array of constants.
ShtNames = Array("Sheet1","Sheet3",'Sheet5")
for each ShtName in ShtNames
Set Sht = sheets(ShtNames)
nextt ShtName
--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=181370
Microsoft Office Help