![]() |
Write " to a string
Hi
I have to write a single " (quotation mark) to a string but excel takes it as an delimiter. Anyone has a bright idea Thanks in advance Crister |
Write " to a string
MyString ="""
-- Ian -- "thyrmo" wrote in message oups.com... Hi I have to write a single " (quotation mark) to a string but excel takes it as an delimiter. Anyone has a bright idea Thanks in advance Crister |
Write " to a string
Thanks for the quick reply
and as normal the simplest soultions are the best |
Write " to a string
Good morning Thyrmo The reference number for the " is 34. Therefor the following line would place a single quote in a string contained in the variable a : a=Chr(34) HTH DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=465843 |
Write " to a string
I think you mean
MyString = """" Any time you want to embed quote marks in a quoted string they need to be doubled up Debug.Print "This is a ""quoted string""" "Ian" wrote: MyString =""" -- Ian -- "thyrmo" wrote in message oups.com... Hi I have to write a single " (quotation mark) to a string but excel takes it as an delimiter. Anyone has a bright idea Thanks in advance Crister |
Write " to a string
"Charlie" wrote in message
... I think you mean MyString = """" No, thyrmo asked to write a single " into a cell, your solution writes "" instead. -- Ian -- |
Write " to a string
Hi Ian Try running this routine and see what you get. Sub test() a = """" MsgBox a End Sub Dominic -- dominic ----------------------------------------------------------------------- dominicb's Profile: http://www.excelforum.com/member.php...fo&userid=1893 View this thread: http://www.excelforum.com/showthread.php?threadid=46584 |
Write " to a string
Either works to produce just a single "double quote" as the result.
from the immediate window: ? """" " ? """ " -- Regards, Tom Ogilvy "dominicb" wrote in message ... Hi Ian Try running this routine and see what you get. Sub test() a = """" MsgBox a End Sub DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=465843 |
All times are GMT +1. The time now is 01:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com