+ Reply to Thread
Results 1 to 6 of 6

Cop VBA to remove " " marks

  1. #1
    Registered User
    Join Date
    06-13-2018
    Location
    Glasgow
    MS-Off Ver
    2013
    Posts
    33

    Cop VBA to remove " " marks

    Hello,

    I have a button when clicked it generates and copies specific text. This is then pasted to another program that uses plain text. When pasted the text has the " mark at the beginning and end. Is there any way to remove this?

    Current VBA is:

    Please Login or Register  to view this content.
    This produces the result of "Statement 1 - BLAH BLAH BLAH" "Statement 2 - BLAH BLAH BLAH". I want it to paste as Statement 1 - BLAH BLAH BLAH Statement 2 - BLAH BLAH BLAH.

    If anyone can help it would be greatly appreciated.

    Thanks
    Last edited by MonTheEck; 01-23-2019 at 12:43 PM.

  2. #2
    Forum Contributor
    Join Date
    08-08-2005
    Location
    Kansas, USA
    MS-Off Ver
    2016
    Posts
    293

    Re: Cop VBA to remove " " marks

    A few suggestions:

    1) Complete the quotes in the Case line
    2) You have curly quotes vs double quotes at the end of the Statement 1 line. Not sure if that affects anything, except it causes an error if I paste it as-is into VBA.
    3) Replace vbNewLine with " - " to get what you want.

  3. #3
    Registered User
    Join Date
    06-13-2018
    Location
    Glasgow
    MS-Off Ver
    2013
    Posts
    33

    Re: Cop VBA to remove " " marks

    What do you mean by 'Complete the quotes in the Case line'. The quotes are only there to define the text I want in the cell

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Cop VBA to remove " " marks

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  5. #5
    Registered User
    Join Date
    06-13-2018
    Location
    Glasgow
    MS-Off Ver
    2013
    Posts
    33

    Re: Cop VBA to remove " " marks

    I have uploaded the Before And After test Excel sheet. (see attached) I have included the AFTER (without the exclamation marks). The place where it is pasted is pasted as plain text. It is not a standard email service so I cant set it up to send an email via a suitable program.

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Cop VBA to remove " " marks

    Well your file looks for some library that I don't have. But I think your Workbook_Open routine will effect your quote elimination with this tested added one liner (in red):

    Please Login or Register  to view this content.

+ 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. [SOLVED] drag-across of INDIRECT function does not change cell reference between " " marks
    By Pilly Ears in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-07-2018, 06:56 AM
  2. "Add Row" and "Remove Row" Buttons... adding rows with formulas down filled
    By excelatnothing in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2015, 02:44 AM
  3. Replace "_" with "." and remove Trailing Alpha (where and when applicable)
    By chacamasur in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-24-2014, 02:22 PM
  4. Replies: 1
    Last Post: 08-10-2014, 01:22 PM
  5. [SOLVED] VBA help needed to remove all "/" then replace with "-" from cell "B3"and "B5"
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2014, 02:11 PM
  6. [SOLVED] UDF to remove "equivalent" expressions from a ";" delimited string
    By dredwolf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2012, 07:25 PM
  7. Remove "TRUE" "FALSE" words from a linked checkbox
    By MDCK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2008, 03:26 AM

Tags for this Thread

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