+ Reply to Thread
Results 1 to 4 of 4

Copy and pasting from excel using vba code ......its putting quotes at start and end

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Copy and pasting from excel using vba code ......its putting quotes at start and end

    hi,

    i have a problem where i am copying and pasting cell values from excel manually to say the vba code enviroment and after i paste its adding quotes to the start and end of my text.

    what can be done to prevent this?

  2. #2
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: Copy and pasting from excel using vba code ......its putting quotes at start and end

    ok, what i found is if i copy a range of cells from excel and paste into word then it does NOT add the extra quotes....i guess this is good enough for now.

    but if you know of a better soln please let me know. note: cells i am copying have multiple lines in each cell that i am copying.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Copy and pasting from excel using vba code ......its putting quotes at start and end

    Hi welchs,

    It sounds like you are trying to paste numbers using VBA but they are treated as text. How do you have those variables DIMed?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Copy and pasting from excel using vba code ......its putting quotes at start and end

    It's because you are copying multi-line cells.
    One way is once you have pasted into the VBE, select the text you've pasted, then CTRL H, & replace the " with nothing. just make sure you click Selected Text

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 06-16-2017, 01:06 AM
  2. How to get double quotes to show up after pasting?
    By SusanG in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-10-2015, 07:50 AM
  3. Double Quotes When Pasting Into Browser
    By ebdmbfan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-27-2012, 08:09 AM
  4. [SOLVED] Copy and Pasting Data from Excel into External Programs - Quotes being added?
    By MacGyver7640 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-09-2012, 02:27 PM
  5. [SOLVED] Macro for copy&pasting a range from a specified start
    By Hajik in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2012, 01:56 PM
  6. Replies: 0
    Last Post: 10-05-2010, 09:08 AM
  7. Excel keeps putting quotes in my delimited txts
    By Dermot81 in forum Excel General
    Replies: 1
    Last Post: 10-24-2006, 07:19 PM

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