Results 1 to 4 of 4

Thread: [RESOLVED] add "" (inverted comma within a string)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Posts
    305

    Resolved [RESOLVED] add "" (inverted comma within a string)

    hi guys, there must be a simple solution to this problem but im not able to figure it out at all... what i need is to have a string which has ""(inverted comma) within it ex. str = "my name is "developer"".
    (that developer there should come as it is) but vb obviously terminates the statement before only..
    how can i achieve this..?? plz help.. and i've to keep this way only.. :-(

  2. #2
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: add "" (inverted comma within a string)

    Two double quotes before and two after:
    Code:
    strD = "My Name is ""Doogle"" it's really a nickname"
    or you could concatinate Chr(34) into the appropaiate portion of the string
    Code:
    strD = "My Name is " & Chr(34) & "Doogle" & Chr(34) & " it's really a nickname"
    Last edited by Doogle; Jan 1st, 2012 at 04:33 AM.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Posts
    305

    Re: add "" (inverted comma within a string)

    thanx a ton!!! :-) rated..

  4. #4
    Frenzied Member
    Join Date
    Nov 2010
    Posts
    1,470

    Re: [RESOLVED] add "" (inverted comma within a string)

    there may be a vbconstant vbquote it will change shape if it exists

    you 'll understand if its there

    vbcr becomes vbCr

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width