Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Passing Quotation Marks (Eng/XL97/SR2)

    I would like to pass quotation marks (before/after) a variable and have encountered problems.

    An Example:
    Cell A1 contains the word Hello

    Var1 = Range("A1").Value Var1 = Hello

    Var2= ??? this is the problem Var2 should = "Hello" (notice the quote marks before/after Hello)


    It is the simple things in life that give us problems.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passing Quotation Marks (Eng/XL97/SR2)

    Try:

    <pre> Var2 = """Hello"""
    </pre>

    Legare Coleman

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passing Quotation Marks (Eng/XL97/SR2)

    I guess I should have made a notation that Var2 = Var1 and the final results should read as: "Hello"

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passing Quotation Marks (Eng/XL97/SR2)

    Its the simple things....

    The solution is: Var2 = """" & Var1 & """"

Posting Permissions

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