Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to set how many sheets are in a workbook
when you use Workbooks.Add. Or can I set the sheetcount without writing a loop to add the amount of sheets. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Try this Sub test() Dim OldValue As Integer OldValue = Application.SheetsInNewWorkbook Application.SheetsInNewWorkbook = 4 Workbooks.Add Application.SheetsInNewWorkbook = OldValue End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Excel and VBA user" wrote in message ... Is it possible to set how many sheets are in a workbook when you use Workbooks.Add. Or can I set the sheetcount without writing a loop to add the amount of sheets. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Or, if you only want one worksheet, use this...Workbooks.Add(xlWorksheet)
"Ron de Bruin" wrote: Hi Try this Sub test() Dim OldValue As Integer OldValue = Application.SheetsInNewWorkbook Application.SheetsInNewWorkbook = 4 Workbooks.Add Application.SheetsInNewWorkbook = OldValue End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Excel and VBA user" wrote in message ... Is it possible to set how many sheets are in a workbook when you use Workbooks.Add. Or can I set the sheetcount without writing a loop to add the amount of sheets. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Or, if you only want one worksheet, use this...Workbooks.Add(xlWorksheet)
Or this Workbooks.Add (1) a higher number is not working Or Workbooks.Add (xlWBATWorksheet) -- Regards Ron de Bruin http://www.rondebruin.nl "TommyGun" wrote in message ... Or, if you only want one worksheet, use this...Workbooks.Add(xlWorksheet) "Ron de Bruin" wrote: Hi Try this Sub test() Dim OldValue As Integer OldValue = Application.SheetsInNewWorkbook Application.SheetsInNewWorkbook = 4 Workbooks.Add Application.SheetsInNewWorkbook = OldValue End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Excel and VBA user" wrote in message ... Is it possible to set how many sheets are in a workbook when you use Workbooks.Add. Or can I set the sheetcount without writing a loop to add the amount of sheets. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Regular Workbooks vs. Binary Workbooks | Excel Discussion (Misc queries) | |||
Updating Workbooks from multiple links Workbooks | Excel Worksheet Functions | |||
Copy/ move selected data from workbooks to seperate worksheets or workbooks | Excel Worksheet Functions | |||
Display 2 formulas from source workbooks to destination workbooks | Excel Discussion (Misc queries) | |||
suddenly my excel workbooks are "shared workbooks" | Excel Discussion (Misc queries) |