Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbooks.add count:=X?
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbooks.add count:=X?
Ted M H;510448 Wrote: 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? There is no equivalent Count argument for workbooks.add. However you could put the workbooks.add command into a loop, even 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 Sub -- p45cal *p45cal* ------------------------------------------------------------------------ p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=140283 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Workbooks.add count:=X? | Excel Programming | |||
Excel2007; workbooks.count is not counting all open workbooks | Excel Programming | |||
Count open workbooks before closing | Excel Programming | |||
I can't see a Workbook in WorkBooks.Count | Excel Programming | |||
Count of workbooks in a directory | Excel Programming |