Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
array question | Excel Discussion (Misc queries) | |||
array question | Excel Worksheet Functions | |||
another array question | Excel Worksheet Functions | |||
Array Question | Excel Discussion (Misc queries) | |||
Array Question | Excel Worksheet Functions |