Re: Display double quotes in text.
From: Dana DeLouis (delouis_at_bellsouth.net)
Date: 03/25/04
- Next message: Fernando Duran: "ADD LINES"
- Previous message: Patti: "Adding borders to used range"
- In reply to: Frank Kabel: "Re: Display double quotes in text."
- Next in thread: Bob Phillips: "Re: Display double quotes in text."
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 25 Mar 2004 12:37:12 -0500
I have seen some code that split the difference and written like this:
Dim s As String
Dim qq As String 'Double Quote
qq = Chr(34)
s = "Hello r u fine " & qq & "ABC" & qq
MsgBox s
I personally find this way a little easier to read and debug. To me, it is
a hair clearer that qq is in fact the Double Quote character.
One can also use characters a little higher on the asc chart if one's
situation allows.
Here, I often might use the double quotes from the Alt+0148 character.
(I don't think it will show here in the newsgroup posting).
s = "Hello r u fine "ABC" "
On a really complicated string about to be evaluated, I just cannot follow /
debug the many double quotes. By using 148, I find it much easier to read.
I will then run a final cleanup before evaluation by letting Excel do the
hard work.
s = Replace(s, Chr(148), Chr(34))
Just some thoughts. :>)
-- Dana DeLouis Using Windows XP & Office XP = = = = = = = = = = = = = = = = = "Frank Kabel" <frank.kabel@freenet.de> wrote in message news:usdUOKkEEHA.1600@tk2msftngp13.phx.gbl... > > Rob van Gelder wrote: > > MsgBox Chr(84) & Chr(114) & Chr(117) & Chr(115) & Chr(116) & Chr(32) > > & _ Chr(109) & Chr(101) & Chr(44) & Chr(32) & _ > > Chr(105) & Chr(116) & Chr(39) & Chr(115) & Chr(32) & _ > > Chr(110) & Chr(97) & Chr(115) & Chr(116) & Chr(121) > > > > For the beginner, learning escape character concept is far more > > useful than learning the Ascii table. > > Escape characters are used in many programs. > > > :-) > o.k I'm convinced! > > Frank
- Next message: Fernando Duran: "ADD LINES"
- Previous message: Patti: "Adding borders to used range"
- In reply to: Frank Kabel: "Re: Display double quotes in text."
- Next in thread: Bob Phillips: "Re: Display double quotes in text."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|