+ Reply to Thread
Results 1 to 5 of 5

Finding an instruction in a macro

  1. #1
    Forum Contributor
    Join Date
    08-19-2006
    Posts
    116

    Finding an instruction in a macro

    Hi all

    My problem is not very easy. That's why i don't know if i am on the good topic. I hesitated between the three topics: miscellaneous, general and programming. I will be long and forgive me. So, i begin. I have created some files with macros. What i want to do is to find an instruction. For example, on my file called example.xls, i have the following macro:

    Please Login or Register  to view this content.

    Later, i want to create a new file with a macro and i want to select the first empty cell in the column. Then i need to use the good instruction. But i don't know it. In fact, i'm not a great programmer. Then i want to search it in my files thanks to the explorer with Ctrl+F. In the explorer, i write: "select the first empty cell in the column". I fact i want to find:"ActiveSheet.Range("B1").End(xlDown).Offset(1, 0).Select".The problem is that the macros are hidden. If i have the following text in the cell A1: "Box". In the explorer, i write "box" and the explorer shows me all results or all files with the text "box". But if i write "select the first empty cell in the column", there's no result because this instruction isn't in a cell but in a macro. Is there a method to find an instruction in a macro. Of course, i have many files and i don't remember. I hope be clear

    Thanks in advance.
    Last edited by VBA Noob; 02-19-2007 at 04:18 AM.

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Most probably this feature is possible with VBE ...
    HTH
    Carim


    Top Excel Links

  3. #3
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi again,

    Code proposed by RB Smissaert ...
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    08-19-2006
    Posts
    116
    Hi Carim

    Thanks for the response but i'm sorry. It's a bit complicated for me. I have the following message (compilation error):"User Defined type not defined (the instruction VBProj As VBProject is highlighted in blue). It's maybe a problem with an object in Microsoft Object Library.I'm lost. Thank you for your help.

  5. #5
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Yes ...
    You are only missing the reference to the Object Library ...
    from menu Tools References ...

+ 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