Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
TradeWB.Sheets.Add After:=Worksheets(TradeWB.Sheets.Count)
I am adding worksheets to a WB using the above line. All I want to do is add a new wks after the last wks in the book. The line of code work for the first 16 iterations but causes a [Run-time error '9' Subscript out of range] error on the 17th iteration. The only way I can get the line to work after adding 16 worksheets is to us a : TradeWB.activate statement before the above line of code. I know this is a workaround, but is this a bug? Can anyone tell me a way of adding worksheets, after the last current worksheet without having to activate the workbook? EA |