View Single Post
  #2  
Old May 26th, 2010, 03:03 PM posted to microsoft.public.visio.general
Paul Herber[_2_]
external usenet poster
 
Posts: 17
Default Need Help with Grid Origin Macro I wrote

On Tue, 25 May 2010 10:58:01 -0700, CalgaryBob
wrote:


Hi All,

I have written a macro to set the Grid Origin (Either Vertical or
Horizontal) to the X-Position or Y-Position of a selected Shape.

It works well if the selected Shape is of the type that uses only a single X
and Y Co-ordinate, but if I try to run the macro when the selected shape uses
Begin X, End X and Begin Y, End Y Co-ordinates, I get an error, and a pop-up
to allow debugging of the macro.


Rather than allow an error to occur you could check whether the cell exists using the
CellExists property on the BeginY cell:
http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

or use the OneD propery to dertmine whether it is a 1D or 2D shape.



--
Regards, Paul Herber, Sandrila Ltd.
Electronics for Visio http://www.sandrila.co.uk/visio-electronics/
Electrical for Visio http://www.sandrila.co.uk/visio-electrical/
Electronics Packages for Visio http://www.sandrila.co.uk/visio-electronics-packages/