+ Reply to Thread
Results 1 to 4 of 4

Excel VBA String Concat Problem

  1. #1
    Registered User
    Join Date
    06-08-2009
    Location
    Gladshire, Greenland
    MS-Off Ver
    Excel 2007
    Posts
    7

    Angry Excel VBA String Concat Problem

    I am trying to concatenate a string together for a formula within an excel macro. This is the line of code:

    Please Login or Register  to view this content.
    Where "dataRow" and "numRecsCol" are Integers. This is the result:

    Please Login or Register  to view this content.
    How do I keep it from adding the stupid single quotes that I have absolutely nowhere in my code, most especially in the places where it has inserted them? The quotes totally screw up the formula so it doesn't work. If, after running the macro, I go to a row and take the quotes from the formula, it works just as it should.

  2. #2
    Forum Contributor starryknight64's Avatar
    Join Date
    09-27-2006
    Location
    Missouri
    MS-Off Ver
    2003 (Work) & 2007 (Home)
    Posts
    193

    Re: Excel VBA String Concat Problem

    Try this instead:

    Please Login or Register  to view this content.
    Right off the bat, it seems a little slow to me, but it does get rid of those pesky single quotes.

    I know I've seen this topic before though in this forum. I can't remember if this was the solution or not though. I'll poke around and see what I can find. In the meantime, see if that works for you.
    starryknight64

  3. #3
    Registered User
    Join Date
    06-08-2009
    Location
    Gladshire, Greenland
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Excel VBA String Concat Problem

    Nope... that worked... don't care if it is slow.... just care that it works...

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Excel VBA String Concat Problem

    Or ...
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1