So you use code to produce the DV's and then 'hand craft' the dynamic
ranges to each DV?
Howard
No! I use code to define the dynamic ranges that are used by the
existing DVs on the mentioned "Expenses" and "Income" sheets. That
keeps the DVs as intended so only their source lists update physically
and so the lists update accordingly.
Adding new Categories/SubCategories to the "Summary" sheet is done by
copying a manually constructed 'group' (as in 'Group and Outline')
stored in hidden rows above the working area. This consists of the
Categorie row (which contains the expander) and the default "Other?"
subcategory row immediately below it. Additional subcategory rows are
inserted as needed by copying just the default subcategory row. This
allows summary/detail viewing of the sheet on a per-category basis or
entire list. (FYI: The sheet is configured like a Profit&Loss statement
that can show/hide sub account details, where each sub account displays
its totals that make up the total for its parent account)
I was using DVs on this sheet as I currently customize each app for the
user and so having the DVs made this easier to pull accounts from the
"Lists" sheet. But I want to get away from having to do this so the
project is entirely user-customizable. Currently, I remove the DVs when
I'm done the setup, leaving the list as constant values. (This is a
'read-only' sheet)
In order to modify this later the user needs to send me a copy of their
working file and wait for me to make the revisions and return the file.
(IMO it's a dumbass idea, but that's how the local ChamberOfCommerce
suggested I do it! I've since (after 7 years) been able to change this
thinking<g>) I'm in the midst of upgrading the app and so is why your
topic caught my attention.
My approach to what you're trying to do involves updating the dynamic
lists only, resulting in the DVs auto-updating their contents. Your
approach requires redefining the DV list criteria, which I do not
recommend as the way to go for persistent DVs on a worksheet. I'm fine
with doing that on-the-fly when needed, but not by entering the formula
for defining the dynamic range. I prefer to define the range then add
that name as the DV formula.
For clarity:
My "Lists" sheet starts with main categories in colA, and are
configured as...
REVENUE
Income1
Income2
Income3
Other Income
EXPENSES
Expense1
Expense2
Expense3
Expense4
Expense5
Other Expense
....and so on as per the tax agency's e-return form
OTHER_EXPENSES
OtherExpense1
OtherExpense2
OtherExpense3
....and so on as per user defined need
Miscellaneous
The REVENUE section is a dynamic range that begins with the 1st account
below the UCase header "REVENUE" and ends with "Other Income".
The EXPENSES section is a dynamic range that begins with the 1st
account below the UCase header "EXPENSES" and ends with "Other
Expense".
The OTHER_EXPENSES section is a dynamic range that begins with the 1st
account below the UCase header "OTHER_EXPENSES" and ends with
"Miscellaneous".
Sub-Accounts run horizontally from their respective header, where each
main account is defined as the header for its respective sub-accounts.
The dynamic range is named by removing spaces in its header. So the
"Bank Charges" Expense account is the header named "BankCharges" for
defining its sub-account members. This may look like this...
Bank Charges | Bank Fees | Overdraft Interest | Other Bank Charges
...where every sub-account list ends with "Other " prepended to the
account name as its final detail sub category so all unclassified
entries have a place to go.
As mentioned, the EXPENSES section is preset to the tax return form and
so I only need to update this if/when the Revenue Agency changes their
form. Now you can appreciate my need to change the thinking about me
having to manually update every user's working file for changes going
forward. Revenue Agency form changes are automatic app update entries.
This can use the same code as the user-defined customizations done
through the UI. This will happen via an update file that gets read at
startup (if it exists), processed, then deleted so it doesn't redo this
at next startup.
So on my "Expenses" and "Income" sheets the sub-category DVs are
dependant on the Category DV selections, where each list item is the
header for the dynamic sub-account list for that item. expect you can
now more easily understand why I think it's better to use the name of
the dynamic range for the DV list criteria. Your approach leaves way
too much room for disater to strike for my liking<g>!
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion