+ Reply to Thread
Results 1 to 6 of 6

VBA recorded macro for replacing text doesn't work after relaunching it manually

  1. #1
    Registered User
    Join Date
    07-15-2018
    Location
    Szeged
    MS-Off Ver
    16
    Posts
    3

    VBA recorded macro for replacing text doesn't work after relaunching it manually

    I recorded a macro for replacing text and while recording, the replace function worked perfectly and everything was replaced what I needed.

    However when the recording ended and I tried to relaunch the macro manually, it didn't replace everything.

    I don't know what this is (see picture, maybe text box?) but the manually launched macro can't replace those. (however if I use the built in replace function --> word can replace those as well)

    So it's a kinda weird thing and I don't understand this... If the macro represents exactly what I did while recording the macro then how can the relaunch of the macro give another outcome?

    Thank you very much for your help or ideas, it means a lot to me.

    Have a nice day!



    teszt.jpg
    Please Login or Register  to view this content.

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    5,672

    Re: VBA recorded macro for replacing text doesn't work after relaunching it manually

    .
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-15-2018
    Location
    Szeged
    MS-Off Ver
    16
    Posts
    3

    Re: VBA recorded macro for replacing text doesn't work after relaunching it manually

    Thank you but I have problem with a word file :/

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    5,672

    Re: VBA recorded macro for replacing text doesn't work after relaunching it manually

    .
    I apologize. I did not realize you are working with WORD.

    Perhaps someone else can assist.

  5. #5
    Registered User
    Join Date
    07-15-2018
    Location
    Szeged
    MS-Off Ver
    16
    Posts
    3

    Re: VBA recorded macro for replacing text doesn't work after relaunching it manually

    My intuition was right: the built in replace can search through everything, but when laucnhing a macro it only searches it texts... (so no text boxes, etc)

    You have to go through every textbox etc so you will be able to replace everything using your manual macro.
    Solved by this:
    wordmvp.com/FAQs/MacrosVBA/FindReplaceAllWithVBA.htm

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    5,672

    Re: VBA recorded macro for replacing text doesn't work after relaunching it manually

    .
    Glad you found a solution.

+ 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] Recorded Macro for Excel Table doesn't work when run again
    By saravnepali in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-14-2019, 08:43 PM
  2. A VBA code within a XLSM file doesn´t work anymore after replacing a cell range
    By andre_teprom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-15-2016, 08:56 AM
  3. [SOLVED] Working Formula Entered in Recorded Macro doesn't work when run!
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-24-2014, 11:07 AM
  4. Recorded macro - doesn`t work
    By Bandini in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-12-2014, 02:20 AM
  5. [SOLVED] Recorded Pivot Table Macro Doesn't Do What I Recorded!
    By diakonos1984 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2013, 11:01 AM
  6. [SOLVED] Recorded macro doesn't work 5 seconds after creation...
    By Bjordion in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-22-2013, 04:51 PM
  7. [SOLVED] Web query in macro doesn't work until you manually edit it
    By moxy_fruvus@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-07-2005, 02:06 PM

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