Connecting Tech Pros Worldwide Forums | Help | Site Map

How to remove the single quotes (apostrophes) around a hyperlink address.

Richard Hollenbeck
Guest
 
Posts: n/a
#1: Nov 13 '05
I have an email field and a command button to send email. The
problem is that when the email program opens up there are
apostrophes around the email address that I have to manually
remove before sending the email. My code is very simple. I
can't understand why the apostrophes are put there but the
addresses won't work until they are stipped of the apostrophes.
Here's my code:

Private Sub cmdEmail_Click()
If len(txtEmail) > 0 Then
cmdEmail.HyperlinkAddress = "mailto:'" & txtEmail & "'"
End if
End Sub

Is there another way to re-write this that won't produce the
single quotes?

Thanks.

Rich Hollenbeck



Tom van Stiphout
Guest
 
Posts: n/a
#2: Nov 13 '05

re: How to remove the single quotes (apostrophes) around a hyperlink address.


On Thu, 03 Mar 2005 16:37:26 GMT, "Richard Hollenbeck"
<richard.hollenbeck@verizon.net> wrote:

The "Replace" function is great for taking out unwanted characters.
Check with your help file.

-Tom.

[color=blue]
>I have an email field and a command button to send email. The
>problem is that when the email program opens up there are
>apostrophes around the email address that I have to manually
>remove before sending the email. My code is very simple. I
>can't understand why the apostrophes are put there but the
>addresses won't work until they are stipped of the apostrophes.
>Here's my code:
>
>Private Sub cmdEmail_Click()
> If len(txtEmail) > 0 Then
> cmdEmail.HyperlinkAddress = "mailto:'" & txtEmail & "'"
> End if
>End Sub
>
>Is there another way to re-write this that won't produce the
>single quotes?
>
>Thanks.
>
>Rich Hollenbeck
>[/color]

Rog
Guest
 
Posts: n/a
#3: Nov 13 '05

re: How to remove the single quotes (apostrophes) around a hyperlink address.


try: cmdEmail.HyperlinkAddress = "mailto:" & txtEmail

Richard Hollenbeck
Guest
 
Posts: n/a
#4: Nov 13 '05

re: How to remove the single quotes (apostrophes) around a hyperlink address.


"Rog" <delahayerc@state.gov> wrote in message
news:1109920803.571038.170280@f14g2000cwb.googlegr oups.com...[color=blue]
> try: cmdEmail.HyperlinkAddress = "mailto:" & txtEmail[/color]

Yes! That did it. Thank you very much.


Closed Thread


Similar Microsoft Access / VBA bytes