View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default SheetsInNewWorkbook

Hi

I can't test it for you but try this instead for a one sheet workbook

Workbooks.Add (1)
Or
Workbooks.Add (xlWBATWorksheet)



--
Regards Ron de Bruin
http://www.rondebruin.nl


"ROn..." wrote in message oups.com...
Hello,

Does someone know why this doesn't work in VBA (Excel 97):

lTemp = Application.SheetsInNewWorkbook
Application.SheetsInNewWorkbook = 1
Set wbTarget = Workbooks.Add
Application.SheetsInNewWorkbook = lTemp

Gr. ROn...