| |
keithan
Posts: 1
Score: 0
Joined: 9/8/2007
Status: offline
|
Hi all. New to the forum. My apologies if this is a redundant post, but I did spend some time looking through previous threads - no joy. Anyhow, I am intermittently experiencing a subscript out of range error related to the following code: Worksheets(1).Activate ... spreadsheet manipulations involving only sheet formatting and modifying cell values ... Worksheets(2).Activate --> this line seems to cause the error. Though it happens sometimes and not others. Although, the times that it does occur, it seems that i've started my script while worksheet 2 has been already activated. (e.g., i hit my custom button tied to that macro while on worksheet 2). but, being on sheet 2 does not always cause the problem. finally, sheet 2 may be named something other than "Sheet2". but to my understanding, one should be able to always use the index (i.e. Worksheets(i)). again though, the error doesn't always occur. Anyone know why this might be happening? Keithan
|
|