Originally Posted by
Ken Puls
I'm sorry. Call me dense, if you like, but I really don't understand what you're asking.
The code I provided will only add a sheet to the workbook if there is 1 worksheet (less than 2) in the book. If there are more sheets, then it sets the 2nd worksheet to a variable and activates that sheet. To test it, add a second sheet, select the first sheet in the workbook, then run the code. It will select sheet 2.
Exactly what are you/are you not expecting to happen if there is more than 1 sheet? My guess is that it is just not doing what you really want it to do... As both Bob and I have pointed out, the code is doing what I told it to...
Can you explain a little more?