Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Array question

PrintFileNames = Application.GetOpenFilename _
(FileFilter:="Excel Files (*.xls), *.xls", _
MultiSelect:=True)
gives me the workbooks selected by the user.

What I would ideally like to do is as follows:

Call each workbook and ask the following questions
of the user:

With Workbook "whatever".Name do you want to do
any of the following, to all of the worksheets:
i) print all worksheets
ii) print all ranges that total zero
iii) hide some columns

I think this used to be known as a 'conditional branching'
situation.

If i) ii) and iii) prove true for a particular workbook then
life is reasonably simple ( I think). But how do I best
structure code for the various options?

Is this a case for building arrays that are a sort of 'subset'
of the workbook array (is that possible?) for each of the
questions, since when any question returns False, then
I'm going to have to test each worksheet in each workbook.

The end result will be printed data for the user. Currently
there are only 3 types of workbook (a simple test establishes
which type) so pagesetup needs only to be established once
for each workbook, before the individual ranges are printed.

How do I structure this so that a user has the flexibility they
need, but such that they do not have to define every option
for each individual book/sheet, please?

With a lot of ng help, I have a routine that is 95% complete
in a rudimentary way, but being lengthy, I hesitate to post it
to the group.

Any advice would be most welcome.

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.505 / Virus Database: 302 - Release Date: 30/07/2003


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Array question

Bob Kilmer has posted an answer to the later message.

Stuart wrote:

PrintFileNames = Application.GetOpenFilename _
(FileFilter:="Excel Files (*.xls), *.xls", _
MultiSelect:=True)
gives me the workbooks selected by the user.

What I would ideally like to do is as follows:

Call each workbook and ask the following questions
of the user:

With Workbook "whatever".Name do you want to do
any of the following, to all of the worksheets:
i) print all worksheets
ii) print all ranges that total zero
iii) hide some columns

I think this used to be known as a 'conditional branching'
situation.

If i) ii) and iii) prove true for a particular workbook then
life is reasonably simple ( I think). But how do I best
structure code for the various options?

Is this a case for building arrays that are a sort of 'subset'
of the workbook array (is that possible?) for each of the
questions, since when any question returns False, then
I'm going to have to test each worksheet in each workbook.

The end result will be printed data for the user. Currently
there are only 3 types of workbook (a simple test establishes
which type) so pagesetup needs only to be established once
for each workbook, before the individual ranges are printed.

How do I structure this so that a user has the flexibility they
need, but such that they do not have to define every option
for each individual book/sheet, please?

With a lot of ng help, I have a routine that is 95% complete
in a rudimentary way, but being lengthy, I hesitate to post it
to the group.

Any advice would be most welcome.

Regards.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.505 / Virus Database: 302 - Release Date: 30/07/2003


--

Dave Peterson

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
array question Mona Excel Discussion (Misc queries) 2 March 23rd 10 08:41 PM
array question Len Case Excel Worksheet Functions 3 December 17th 07 09:48 PM
another array question Robert Dieckmann Excel Worksheet Functions 5 January 20th 07 02:08 AM
Array Question keeblerjp Excel Discussion (Misc queries) 4 June 20th 06 04:21 PM
Array Question Renee Excel Worksheet Functions 0 June 29th 05 07:10 PM


All times are GMT +1. The time now is 10:54 PM.

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"