+ Reply to Thread
Results 1 to 10 of 10

Find & Replace Dialog Box - Error Msg When Implementing

  1. #1
    Forum Contributor
    Join Date
    05-20-2008
    Location
    Virginia
    MS-Off Ver
    2003
    Posts
    129

    Question Find & Replace Dialog Box - Error Msg When Implementing

    I have the following code in a macro to open up a find dialog box, but it does not seem to work. I am getting the following message when I try to find something:

    Microsoft Office Excel cannot find any data to replace. Check if your search formatting and criteria are defined correctly. If you are sure that matching data exist in this workbook, it may be on a protected sheet. Excel cannot replace data on a protected sheet.

    I checked the data I am trying to find and replace and it is correct. Please HELP me!

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Hi

    You didn't post your code

  3. #3
    Forum Contributor
    Join Date
    05-20-2008
    Location
    Virginia
    MS-Off Ver
    2003
    Posts
    129

    Basic Code Using to Do Find and Replace

    'Open up charts worksbook.
    Workbooks.Open ("E:\Reports\Charts\030.xls")

    'Goes to last tab.
    Worksheets(Worksheets.Count).Activate

    'Open the find and replace dialog box in the charts worksheet, so you can change the labor information.
    Application.Dialogs(xlDialogFormulaFind).Show

    'Save charts spreadsheet.
    ActiveWorkbook.Save

    The code above is what I am using. I can't get the find and replace to do what it should though. It opens up the dialog box though.

  4. #4
    Forum Contributor
    Join Date
    05-20-2008
    Location
    Virginia
    MS-Off Ver
    2003
    Posts
    129

    Works for Simple Things - But Not What I Want It Too

    Hi,

    I am trying to figure out why it don't work, and I found that it does work on somethings. It will find things that are not in a formula, but I want it to find something in a formula. Is there a way to find something in a formula????????? PLZZZ HELP

  5. #5
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    It works for me - is the dropdown in the formula box set to Look In: Formulas or Values?

  6. #6
    Forum Contributor
    Join Date
    05-20-2008
    Location
    Virginia
    MS-Off Ver
    2003
    Posts
    129

    Ops I forgot to add .xls on the stuff changing- now another problem

    Hi Richard,

    I forgot to add .xls on the end of the file changing. Now it works somewhat but not exactly. When I do a replace all for the file, it is making me search for the file how ever many times I need to change it. I want to change them all at once without looking for the file 100 times!!

    I am able to do the find and replace all perfectly manually without having to open the file if it is already open. Please help me

  7. #7
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    No worries - I think you want:

    Please Login or Register  to view this content.
    Richard

  8. #8
    Forum Contributor
    Join Date
    05-20-2008
    Location
    Virginia
    MS-Off Ver
    2003
    Posts
    129

    Situation Worse Now ????

    Richard,

    My Find and Replace does not work right anymore now when I do it manually. Also, the solution you just gave me works the same way as the manual find and replace does. I get a box to locate the file for every instance that I have to do a replace with. I have like a 100 links in the file, and I have really messed up something now! - SEOT

  9. #9
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Don't you want the Find/Replace to work as it does manually? You can click the Replace All button to replace every instance on the current sheet. If you want to loop thru all sheets, then you do have to do it slightly differently. Is this what you want?

  10. #10
    Forum Contributor
    Join Date
    05-20-2008
    Location
    Virginia
    MS-Off Ver
    2003
    Posts
    129

    Thumbs up RICHARD - > Your the BEST!!!!!

    Richard,

    I moved some files around, and I had my file path wacked out. This is why it kept prompting me for the file path for every single link. Your solution worked after all!!!!!! You are a great help!!!! I do appreicate you tremendously!!!!!! You have helped me automate a little more of my work!!!!!! Thank U BUDDY- SEOT



    Maybe one day I will be as good as you. I am trying to learn this stuff currently. I just started reading a book on it. I have a little programming knowledge but not much, and I have not practiced the little I know in a while.

+ 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