Visio 2013 - VBA question - Double-click a shape and open browser/download a file

When I double-click a shape I would like to have a browser open up and hit a particular web page.
What is the code to do this?

When I double-click a shape I would like to have a browser open up and download a particular file.
What is the code to download a file which is located at:
Who is Participating?
Scott HelmersConnect With a Mentor Visio Consultant, Trainer, Author, and DeveloperCommented:
Two options:

1) If having the user type Ctrl+click instead of double-click is OK, then just add a hyperlink to the shape via the hyperlink dialog (Ctrl+K).

2) But if you want the user to double click, you can actually accomplish that without a macro because every Visio shape has a built-in double click event. You can set the event for many purposes by selecting the shape, clicking the Behavior button on the Developer tab, and then clicking the Double-Click tab.

In this case, however, you can't set a link to a URL from the UI. Instead, you just need to place a formula containing the HYPERLINK() function into the shape's EventDblClick cell in the ShapeSheet:
-- turn on the Developer tab if it's not already
-- right-click the shape and select Show ShapeSheet
-- scroll down to the Events section
-- type this formula into the EventDblClick cell

There's an example below.event double-click cell There are additional options for the HYPERLINK() function as documented in the Visio help text.

to run a macro when dbl-clicking a shape

refer to

to download a file from an URL pls try

brothertruffle880Author Commented:
I love you!  That was the answer I was looking for!!!!  That shapesheet tweak is what I needed!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.