Hyperlink focus and default email program ?

G

Guest

Hi;

Is there a way, preferrably using macros / VBA, to change the action of
Hyperlinks?

Right now, some of my users find that if they inadvertently click once on a
hyperlink they end up getting an email program ('Word") which they didn't
intend. Can I change calling hyperlink action to a double click or
Ctrl-click or something more deliberate.

Secondly, how can I set up a preferred email program for Excel hyperlinks
for each different user? Baseing it on login name would do.

Regards Bill
 
G

Guest

You can't change the real hyperlink, but you can use the beforedouble click
event to react to a double click on the cell. Put a string in the cell and
make it look like a hyperlink by formatting it as blue with an underline.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
if Target.count > 1 then exit sub
if not intersect(Target,Range("B9,B13,B16,B23")) is nothing then
Cancel = False
select Case Target.Address(0,0)
Case "B9"
ThisWorkbook.FollowHyperlink "actual hyperlink string"
Case "B13"
Application.Goto Worksheets("Sheet6").Range("F11"), True
Case

and so forth

There is a registry setting for the default mail program, but I don't have
any information on it. Perhaps someone else will jump in.

You might want to use the hyperlink Mailto: command. That should use the
default mail program.

http://tinyurl.com/zc44h

See Gary's post and of course Ron de Bruin's links.
 

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