Results 1 to 12 of 12

How to search for a string that includes the " symbol

Threaded View

  1. #1
    Registered User
    Join Date
    06-30-2006
    Posts
    17

    How to search for a string that includes the " symbol

    Hi,

    I'm writing some VB in an Excel macro to search and replace a string of text.

    The problem is that the string contains the " symbol, so when Access gets to that symbol it thinks that it's reached the end of the string.

    e.g.

    I want to replace "0519","863027" (including the quotes) with "0001","863027"


    This is what the code looks like, but it obviously doesn't work :

    Cells.Replace What:="0519","863027", Replacement:="0001","863027", LookAt:= _
            xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
            ReplaceFormat:=False
    Please could someone let me know what syntax to use so that I can include the quotes in the search string?

    Many thanks,
    Jon
    Last edited by jonrayworth; 09-18-2009 at 04:24 PM. Reason: Add code tags

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