Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbooks.add count:=X? Jacob Skaria Excel Programming 0 October 1st 09 07:57 PM
Excel2007; workbooks.count is not counting all open workbooks greg.campeau Excel Programming 2 August 2nd 08 08:37 PM
Count open workbooks before closing Les Excel Programming 2 June 25th 07 05:11 AM
I can't see a Workbook in WorkBooks.Count Jordi Excel Programming 3 November 13th 03 01:08 PM
Count of workbooks in a directory David Excel Programming 1 November 11th 03 10:20 PM


All times are GMT +1. The time now is 12:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"