Macro, how to specify a focused object

T

Tak

Using Visio Pro 2003 SP1.

Am a newbie to start macro usage. I draw a lot of electronic
circuits.
Frequent use is the line start/end shape of dot (black filled small
circle) to indicate line connections. I want to do it in a single
action, say a shortcut key or a tool button.

Used macro recorder, but, alas, it specifies only the line written
now, not for the line which is forcused generally.

How can I achieve this?

Tak
 
C

Chris Roth [ Visio MVP ]

First step, try this in VBA:

Sub SetLineEnd
dim shp as visio.shape
set shp = visio.activewindow.selection(1) ' get the selected shape
shp.CellsU("BeginArrow").ResultIU = 10 ' 10 = dot
shp.CellsU("EndArrow").ResultIU = 10
End Sub

--

Hope this helps,

Chris Roth
Visio MVP
 
T

Tak

Thanks a lot!

It worked.
I modified it for each begin and end, and assigned shortcuts.

Gota learn VBA.
Tak
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top