Connecting Tech Pros Worldwide Help | Site Map

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

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 07:52 AM
Richard Hollenbeck
Guest
 
Posts: n/a
Default How to remove the single quotes (apostrophes) around a hyperlink address.

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



  #2  
Old November 13th, 2005, 07:53 AM
Tom van Stiphout
Guest
 
Posts: n/a
Default 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]

  #3  
Old November 13th, 2005, 07:53 AM
Rog
Guest
 
Posts: n/a
Default Re: How to remove the single quotes (apostrophes) around a hyperlink address.

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

  #4  
Old November 13th, 2005, 07:54 AM
Richard Hollenbeck
Guest
 
Posts: n/a
Default 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.


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.