+ Reply to Thread
Results 1 to 4 of 4

Create simple interactive macro

  1. #1
    Registered User
    Join Date
    12-09-2009
    Location
    Green Bay, Wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    2

    Create simple interactive macro

    I'm a novice at macros and don't know VBA, so I'm hoping someone can help me set up a simple interactive macro. I want to create a macro that will disable protection on the sheet, copy a row, insert the row, then bring up the find/replace window for user input, then continue with the macro. The only part I can't figure out is how to bring up the find/replace window for user input and then continue with the macro. Can this be done using Excel tools or would I have to learn VBA? Could you provide some guidance on the steps needed to accomplish this? Thank you.
    Last edited by mcbarker; 12-09-2009 at 01:47 PM. Reason: Clarification

  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: Create simple interactive macro

    Hello mcbarker,

    Welcome to the Forum!

    Here is a macro that will display the Find/Replace dialog.
    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
    12-09-2009
    Location
    Green Bay, Wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Create simple interactive macro

    Thanks for the quick response. However, since I'm really ignorant about the code language, it will take me some time to translate the answer into something I can understand. For example, I have no idea why "1849" is used or what it means. Is there some reference material that would explain what these words and code mean? I've been going through some training on the internet all day, but haven't found a list of code words and explanations yet.

  4. #4
    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: Create simple interactive macro

    Hello mcbarker,

    The 1849 is the ID number of the "Find..." control on the "Edit" menu. The menu controls can be accessed either by name, menu position (index), or by their system id number. The code searches all menus for the "Find..." control. When it locates the first instance of the control, the object variable cbCtrl (Command Bar Control) is set to point to the Find/Replace code routine. The Execute method then displays the system Find/Replace dialog.

    There are 2 authors you should research: Steve Roman, and John Walkenbach. Both have written several books about VBA. They provide examples of real life code along with easy to understand explanations. Of course there are more books about VBA, these authors are two that like.

+ 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