473,385 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
Nov 13 '05 #1
3 2751
On Thu, 03 Mar 2005 16:37:26 GMT, "Richard Hollenbeck"
<ri****************@verizon.net> wrote:

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

-Tom.

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


Nov 13 '05 #2
Rog
try: cmdEmail.HyperlinkAddress = "mailto:" & txtEmail

Nov 13 '05 #3
"Rog" <de********@state.gov> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
try: cmdEmail.HyperlinkAddress = "mailto:" & txtEmail


Yes! That did it. Thank you very much.
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Dynamo | last post by:
Hi, I am still confused as when to use single or double quotes. This works: echo "<td>" . $row . "</td>"; and this does not
2
by: Ken Fine | last post by:
I'm using XMLHTTP to screen-scrape many thousands of pages of content as part of a data-structuring project. One issue that I'm running into is that some entities such as curly quotes and curly...
2
by: David Bird | last post by:
I am attempting to build a command string to update a field in a dataset. the command string looks like this: Dim cmdString As String = "Update set lName = '" & clName.Trim & "', fName = '" &...
7
by: Tim Mulholland | last post by:
I have an issue i can work around, but i'm trying to figure out what i'm "supposed" to do. i have a line of HTML/ASP.NET code inside a repeater that is something like this <a...
7
by: gar | last post by:
Hi, I need to replace all the double quotes (") in a textbox with single quotes ('). I used this code text= Replace(text, """", "'" This works fine (for normal double quotes).The problem...
7
by: nick.bonadies | last post by:
I'm trying to deal with user inputs of single quotes into form fields that get input into a MSSQL database. So far I have discovered that if I turn on magic_quotes_sybase in my php.ini file PHP...
8
by: charlespb69 | last post by:
I am new to php so this might be a real simple question. I have a form that users are able to input information into and the information goes into a mysql database table.. But single quotes...
9
by: Smiley | last post by:
Hi, Can someone tell me how to remove aspostophe (') from user input. I don't want to give any error message. Just want to remove or change it to "" or null, such input when it appear anywhere...
2
by: Reporter | last post by:
I got the following example from http://www.evolt.org/article/User_Friendly_Forms_in_PHP/20/60144/index.html : echo '<tr><td>First name:</td><td><input type="text" name="first_name"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.