+ Reply to Thread
Results 1 to 3 of 3

find and replace text within a known module

  1. #1
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    find and replace text within a known module

    Hey all!!

    I have a form that opens when I open a workbook. I use the form to open another workbook via a drop down list. I use Select Case to open the chosen option. What I'm looking to do is change wording in a module in the first opened workbook. How would I use the Find..Replace method and is it possible?
    For instance, the option chosen is "x.xlsm". I then want to access a module from within the first workbook opened and change a line with "y.xlsm" to "x.xlsm" TIA

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: find and replace text within a known module

    Hello jarhead58,

    Here is a macro that will change the text in a VBA Module. You will need to customize it a little for your needs.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    Re: find and replace text within a known module

    Quote Originally Posted by Leith Ross View Post
    Hello jarhead58,

    Here is a macro that will change the text in a VBA Module. You will need to customize it a little for your needs.

    Please Login or Register  to view this content.
    Thanks for the help! I was doing the wrong coding! Sorry for the confusion!!

+ 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. vba code to find text string in module and edit it
    By hopefulhart in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2017, 12:05 PM
  2. [SOLVED] Search through columns and find specific text and replace that text with header column
    By adamzee in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-09-2014, 11:59 PM
  3. [SOLVED] Find & Replace Formula for Locating Short Text within Larger Text
    By garrett.grillo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-08-2014, 05:04 PM
  4. [SOLVED] Find & Replace Formula for Locating Short Text within Larger Text
    By garrett.grillo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-07-2014, 08:47 PM
  5. [SOLVED] VBA to Search a Text String, Find a Value listed in another column and replace the text
    By Jschrod303 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-16-2012, 08:56 PM
  6. find in excel replace in word: find/replace text in text boxes and headers
    By dean.rogers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2012, 12:40 PM
  7. Excel 2007 : Find & Replace can't find text in formulas
    By scdearnl in forum Excel General
    Replies: 1
    Last Post: 04-07-2011, 06:51 AM

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