RobV said:
How do you programatically (with VBA) detect what columns and rows are
visible in an active view?
RobV,
That's coincidence, I just wrote a macro that needed this same
information. In pseudo code, this is what I did for the column
information:
1. Count the number of columns in the active view table. I used,
ActiveSelection.FieldIDList.count
2. Set up a loop based on step 1. To get the field names I used,
FieldConstantToFieldName(ActiveSelection.FieldIDList(1))
As far as knowing which rows are shown, for example when a filter is
applied, I use the following construct:
SelectTaskField
For Each t in ActiveSelection.Tasks
[do stuff]
Next t
Hope this helps.
John
Project MVP