Hi guys - I'm pretty comfortable with VBA Excel programming and have written a number of projects that interact with Powerpoint and MS Project - but I'm new to Visio VBA and struggling just a bit.
I've written a simple project (in Excel - but that's probably irrelevant here) that generates a Metric Timeline diagram from a set of Excel tables. I can quite happily create the timeline, set its start/end-dates, position on the page - and then plot, manipulate and format milestones quite happily.
Where I've hit a (knowledge) problem is in trying to dynamically change the interval markers on the timeline itself.
I can (programmatically) change the Shapesheet settings for the interval and marker frequency (User.visTimeScale etc.) and turn the intervals/markers on/off ("User.visDisplayIntmDates" and "User.visDisplayIntm") - but the timescale setting is not respected - i.e. if I change the setting from Months ('5') to Quarters ('6') and then remove/replace the intervals and dates, the old setting (i.e. Months) is used and not the new one (Quarters).
Furthermore, if I then use the Configure Timeline dialogue from within Visio itself, it does correctly show that I have changed the Time Scale value.
The *only* way I can successfully change the timescale is via the Configure TImeline Dialogue - so I must be missing some kind of event trigger or other ShapeSheet field setting to get it to actually refresh the chosen interval...?
If only the Macro Recorder would give me a hint - but it records nothing when I change the interval details via the UI dialogue.
Can anyone point me in the right direction?
Thanks and regards,
Myles