Visio VBA Block Interval formatting

Started by rg20, May 15, 2009, 02:50:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rg20

Ok all,  I have gotten a lot of good advice in solving problems from this site, but I have one that has not been addressed much on the web.

Currently I am getting information from excel and generating a line timeline.  From the rest of the fields in the excel file, I am getting data to populate the Block Intervals.
But depending on where they are on the page, I need to change their color programatically.

Currently I can use - Interval.fillstyle = "Timeline Divided" and ti will change the background color of the shape.  But the current fillstyles don't have the color I need and would like to change the background color programatically.  I have tried interval.cellsSRC(visSecetionObject,visRowFill,visFillForegnd).formulaU = "RGB(100,100,100)" and substituted visfillbkgnd for visfillforegnd, no luck.
******* I just figured out the background coloring you need use interval.shapes(2).cellsSRC(visSectionObject, visRowFill, visFillBkgnd).FormulaU = "RGB(100,100,100)"  for the bkgnd and foregnd ********

I know that there are several shapes embeded in the block interval, and would like to remove the dates as they are on the timeline.

So first, How can I change the background? (SOLVED  :D See above)
Second How can I remove the protection to delete the dates from the blocks?
Many thanks in advance

Paul Herber

Ensure you have the drawing explorer window open, then select the block interval shape with in the page, within that shape you will see a list of all the sub-shapes, select each one in turn until you find the part that gets the date text highlighted, right-click and select Show Shapesheet, scroll down to the Miscellaneous section and set HideText to true.

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/