userform, email enter in cell WITH HYPERLINK!

dsgs

Active Member
Joined
Oct 25, 2004
Messages
360
Hi I have a userform that amongst others contain "email".
The entered value in this textbox is allways correct (through filters) but i'd like to store the value as a hyperlink!

so:

Code:
    Range("G3") = email2

should be something like:

Code:
    Range("G3") = email2 as hyperlink

any ideas?

thanx!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
dsgs

Where are you entering the address?

What is email2?
 
Upvote 0
Hi Norie,

I'm using a userform with a textbox ("email2"). this should be placed in range("G3") when i click "toevoegen" (button).

i also tried the help function that looked like this:

Code:
With Worksheets(1)
    .Hyperlinks.Add Anchor:=.Range("a5"), _
        Address:="mailto:someone@microsoft.com?subject=hello", _
        ScreenTip:="Write us today", _
        TextToDisplay:="Support"
End With

i didn't get it to work eigther.

what i'm i doing wrong?
 
Upvote 0
What doesn't work with the help example?

I tried it and it created a hyperlink in A5 which when clicked opened a new mail message to someone@microsoft.com.
 
Upvote 0
The example does work but i'd like to use the email adres entered in textbox "email2", i don't like a prewritten subject, the text to display should be what is entered in "email2" and i don't want a screentip. when i changed these things i probebly did something wrong because i couln'd get it to work again....
 
Upvote 0
i finally managed to get it to work:
Code:
    Range("G3").Hyperlinks.Add Anchor:=Range("g3"), _
            Address:="mailto:" & (email2), _
            TextToDisplay:=(email2)
 
Upvote 0
dsgs

Small matter but do you really need the brackets () around email2.
 
Upvote 0

Forum statistics

Threads
1,202,898
Messages
6,052,437
Members
444,581
Latest member
naninamu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top