![]() |
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? |
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 |
All times are GMT +1. The time now is 10:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com