+ Reply to Thread
Results 1 to 7 of 7

Macro to find text in other macro's in other Excel sheets..

  1. #1
    Registered User
    Join Date
    11-06-2009
    Location
    Beverwijk, Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    4

    Exclamation Macro to find text in other macro's in other Excel sheets..

    Kinda confusing title perhaps but I shall explain.

    I have a lot of directories with a lot of Excel sheets. Part of these sheets use the construction to import csv or txt files and display them in the Excel.

    Our it supplier is changing the location of the csv and txt files. To collect the names of all Excel which now have to be changed I'd like to write a macro which will looop through all directories, find all Excel files and look into the macro code to see if a specific location can be found if so, the name can be saved somewhere.

    The part I don't understand of this is how i can write code that searches through the vba code. The rest is no problemo.

    Anyone have a clue ?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro to find text in other macro's in other Excel sheets..

    I don't think that you can, especially if the VBA Projects are protected.

    You can loop through the modules of unprotectd files & list the Procedure names
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    11-06-2009
    Location
    Beverwijk, Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Macro to find text in other macro's in other Excel sheets..

    hi there roy,

    thanks for your fast reply. The code or Excel's are not protected. I don't understand your comment : through the modules of unprotectd files & list the Procedure names .

    Work sequence should be : find file, open file, search in vba, if specified text is found then msgbox found (for example) , close file and go to next...

    search in vba is the part i don't get....

    can you help me with thaT?

    Kind regards,

    Barry

  4. #4
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: Macro to find text in other macro's in other Excel sheets..

    Hi Barry
    What are you trying to do and why - searching the VBE Projects, what you after acheiving?

    Cheers

  5. #5
    Registered User
    Join Date
    11-06-2009
    Location
    Beverwijk, Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Macro to find text in other macro's in other Excel sheets..

    hi there jack,

    hope you can help me, in the text above i described what i'd like to achieve.... i cant formulate it more clearer.. what part is it you don't get?

    Kind regards,

    Barry

  6. #6
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: Macro to find text in other macro's in other Excel sheets..

    Assuming you can poke the VBE in this fashion then what?
    Hacking / viruses –maybe not make myself popular but that’s how I read this one, as I can not understand and reason to code check / find / action as your suggestion
    Correct me if I a wrong? Programming the VBE is extremely complex

  7. #7
    Registered User
    Join Date
    11-06-2009
    Location
    Beverwijk, Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Macro to find text in other macro's in other Excel sheets..

    hmm it's not any of that...

    I work for a big company which works a lot with Excel files. We export data from our mainframe (in txt fileS) to our fileserver. Since the location where the exported data is located will changed i have to update all Excel file which use this data. I'd like to make a summary of all Excel files I have to update...

    Thats the case..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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