Workbooks.add count:=X?

T

Ted M H

I'm trying to figure out the syntax / arguments to add more than one workbook
to the collection of open workbooks. Conceptually it seems this is similar
to adding multiple worksheets to a workbook where worksheets.add count:= 5
would add five worksheets. Is there any way to accomplish the same thing
with workbooks?
 
P

p45cal

Ted said:
I'm trying to figure out the syntax / arguments to add more than on
workbook
to the collection of open workbooks. Conceptually it seems this i
similar
to adding multiple worksheets to a workbook where worksheets.ad
count:= 5
would add five worksheets. Is there any way to accomplish the sam
thing
with workbooks?

There is no equivalent Count argument for workbooks.add.
However you could put the workbooks.add command into a loop, eve
setting up your own sub dedicated to that task eg.:
Sub AddWorkbooks(n)
For i = 1 To n
Workbooks.Add
Next i
End Sub


Sub test()
'call it thus:
AddWorkbooks 4
End Su
 
Top