View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Robert Christie[_3_] Robert Christie[_3_] is offline
external usenet poster
 
Posts: 117
Default Open workbook with x number of sheets

Thanks keepITcool

Jim Beckers post nearly 2 years old - thought maybe the newer 2003 excel may
have included it.

Keep up the good work

Regards Bob C.

"keepITcool" wrote:

that's the code I use too...
and I take it so does the rest as indeed there seems to be no other way.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam

?B?Um9iZXJ0IENocmlzdGll?= wrote in message
:

Hi
Using Office Pro 2003 & WinXP

Is it possible to set the number of sheets when opening a new Workbook
without changing the default .SheetsInNewWorkbook of 3.

I was searching this newsgroup and came across the following in a Jim
Becker post of 17-Dec 2002.

Is this the only way to open a new workbook with a specific number of
sheets?

Code is courtesy of Ed Ferrero (12.02.02):

Dim curr_sheets As Integer
With Application
' save the no of sheets in new book that is currently set in options
curr_sheets = .SheetsInNewWorkbook
.SheetsInNewWorkbook = 3
Workbooks.Add
.SheetsInNewWorkbook = curr_sheets
End With