+ Reply to Thread
Results 1 to 7 of 7

Find/Replace not working

  1. #1
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Lincoln, IL
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    237

    Question Find/Replace not working

    The portion of the code that replaces RESET with 1RESET, works fine on it's own, but not as part of this larger code. It doesn't error out, it just does nothing. Can someone point out what I'm missing? It's at almost the end of the code.

    Please Login or Register  to view this content.
    Last edited by narrowgate88; 06-07-2010 at 02:26 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Find/Replace not working

    Your code opens another workbook, I think your replace code is looking in a different workbook than you intend. To clean this up I would qualify your range. Where is your code located? Is it associated with the worksheet you want to change, or is it in a Module? I would also avoid doing a Select for this. Try this:

    Please Login or Register  to view this content.
    [/COLOR]
    Last edited by 6StringJazzer; 06-07-2010 at 04:09 PM. Reason: grammar
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Lincoln, IL
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    237

    Re: Find/Replace not working

    While waiting, I think I came to that conclusion as well. This code is in a module in the Personal Macro Workbook.

    I tried adding some code to save the output and then reopen, but it doesn't refresh the query data.

    I'll give you suggestion a try.

  4. #4
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Lincoln, IL
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    237

    Re: Find/Replace not working

    That suggestion didn't work. Still show RESET instead of 1RESET.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Find/Replace not working

    Quote Originally Posted by narrowgate88 View Post
    This code is in a module in the Personal Macro Workbook.
    Your environment seems a bit much for me to try to reproduce, but this last sentence made me realize that you also need to qualify the workbook. I assume that the active workbook is the one you need to modify, so try this. The first one looks in Personal.XLS because that's where the code is.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Lincoln, IL
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    237

    Re: Find/Replace not working

    Ok, I will give that a try.

  7. #7
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Lincoln, IL
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    237

    Re: Find/Replace not working

    That did not work either. So at this point, I feel like I'm either going to have to use 2 macros, or figure out a way to get the macro to import the data instead of dealing with the query.

+ 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