+ Reply to Thread
Results 1 to 15 of 15

How to Update One Tab With Find & Replace VBA Code???

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

    How to Update One Tab With Find & Replace VBA Code???

    All,

    My find and replace code is going to all the tabs in my workbook, but I want it to stop in my current spreadsheet I am on. Here is my code:

    Please Login or Register  to view this content.
    How do I make it only do the current tab I am in? I have it go to to the last tab to update it, but it wants to update them all!! Please help me- SEOT
    Last edited by VBA Noob; 07-28-2008 at 04:02 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    If I understand your question, that's an option in the Find and Replace dialog. Click Options, then select Sheet in the first drop-down.

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

    shg- Don't have that option with my code???

    Shg,

    I don't have that option with the code I am using. I have that option when I do it manually via picking the Find under the Edit menu. I don't know how to do this using VBA code though. thanks

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    OK, then I don't understand ...

    You're displaying the find and replace dialog, so someone has to enter what to find and what to replace it with. If that's correct, then they can set the option. If there is a way to manipulate the option from VBA, I don't know it.

    If you want instead to dump the dialog and do the find and replace in VBA, that's possible.

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

    S

    SHG,

    I used the following code for a find

    Please Login or Register  to view this content.
    , but it kept asking me for a path of the file everytime it came to a replacing the information. I had about a 100 replacements so this would not work. Do you know anything else to do??? I can't think of anything at the moment. I keep looking though. Is there a find and replace? I did not see one besides using the code mentioned above. Please help

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    What are you trying to do?

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

    Shg

    SHG,

    I am trying to do a find and replace to change links in a worksheet for a particular tab. The previous tab has the same links and it seems to get updated to when I use the code mentioned above. When I do it manually I am able to select sheets like you mentioned, but the replace dialog box does not give me that option when in VBA code. Does this make sense???

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    You could do something like this instead:

    Please Login or Register  to view this content.

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

    SHG - Still Don't Work???

    SHG,

    This changes the contents of the previous tab since it has the same links in it. I only want it to replace the information in the current tab. Is there any way to stop the replacing of information after the current tab? Maybe code to set the previous tab into numbers instead of links using VBA code?? thanks for trying to help me- SEOT

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    This changes the contents of the previous tab since it has the same links on it.
    I don't think so -- it changes only cells on the active sheet. If you're convinced, post a workbook.

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

    SHG -- Got to work but put a twist in code above that you gave me!

    SHG,

    I finally got it to work!!! I tweaked the code you gave me two posts ago. I put Columns("I") instead of cells and it seems to work now. Here is what I have now:

    Please Login or Register  to view this content.
    You are GREAT help! Thank you my friend!!!!! I really do appreciate you and some others on here!!!!! Hopefully, I will be able to help you more later after I have done some more things! I am just starting to learn this stuff. Thank U Thank Thank U!!!!!!!!!!!!!!!! - SEOT

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    You're welcome, glad it worked for you.

    Maybe brush up on your nomenclature to avoid future confusion; "columns" <> "tabs"

    Regards,

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

    Hi Shg

    I did mean tabs, and I have no clue how columns worked for me. I was desperate, and I was trying anything I could to make it work for me. It works and that is all that matters! Just like said! Thank U So Much!!!!!

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

    Hi Shg

    I did mean tabs, and I have no clue how columns worked for me. I was desperate, and I was trying anything I could to make it work for me. It works and that is all that matters! Just like U said! Thank U So Much!!!!!

  15. #15
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    All's well that ends well

+ 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