Force VB to doubleclick in a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I copy a cell that has an email address created by a formula, it doesn't
work as a hyperlink. I copy & pastevalues but still doesn't work. However, I
notice that I only have to doubleclick on the pasted cell and then just press
enter and it works properly.

Sooooo, how do I force VB to perform an automatic doubleclick in cell G3,nd
then press enter? It will be the same cell every time, not variable. That is
to say that I don't want to manually doubleclick or press enter at all. Or is
there a better way to paste info into the cell that makes it work as a
hyperlink? Styling the cell doesn't work.
 
A good question and the answer can also be adapted to hyperlinks created by
splicing strings:


Let's say in A1:
garysstudent

in B1:
@

in C1:
somewhere.com

finally in D1:
=A1 & B1 & C1

D1 will display:
(e-mail address removed)
but this will not be "clickable"

in another cell enter:
=HYPERLINK("mailto:" & D1,"poster")
This will produce a "clickable" version of D1
 
If you don't want to use a formula, then the macro would be:

Sub mailit_II()
Range("G3").Activate
Application.SendKeys "{F2}"
Application.SendKeys "{ENTER}"
End Sub
 
Thankyou very much, they both work. I prefer the macro version because I'm
creating the cell from a macro in the first place. With the excel code you
supplied it does work but displayed "poster" in the cell. I solved this by
changing your formula to =HYPERLINK("mailto:" & D1,D1). Thanks again, it's
been bugging me for a year!

Regards Brett
 

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

Back
Top