+ Reply to Thread
Results 1 to 3 of 3

Macro: Trying to record Find "word" select all, insert shift to right. Doesn't play back

  1. #1
    Registered User
    Join Date
    12-16-2014
    Location
    MN
    MS-Off Ver
    2013
    Posts
    27

    Macro: Trying to record Find "word" select all, insert shift to right. Doesn't play back

    Ok, this seems to work fine when I do it live, but if I record it with a Macro and play it back I get a run-time error. I noticed what I'm doing isn't totally within the code.

    Basically I want to find all instances of a word, and shift those cells over.

    Let's say it's the word "cat"

    I go to find, type cat, hit ctrl A

    right click on one of the instances, select insert, shift cells right.

    It's fine when I do it live, but when I run the macro I get a run time error.

    However the VBA just shows this:

    Please Login or Register  to view this content.
    No references to me going to find the word "cat" or anything.

    Any idea?
    Last edited by johndoe79; 06-05-2021 at 11:50 AM. Reason: title change

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Problem with Macro

    johndoe, please use code tags when posting code - I have added them for you...this time (see my footnote on how to use/add them)

    Also, we would very much like to help you with your query, however the thread title does not really convey what your request is about (pretty much everyone who posts a VBA question wants help with their macro). Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-16-2014
    Location
    MN
    MS-Off Ver
    2013
    Posts
    27

    Re: Problem with Macro

    Ok I changed it. Does it make sense?

+ 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. Macro problem - loops theough user defined functions not called in macro
    By beccyclaire in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-04-2016, 02:09 AM
  2. Problem with recording a macro with long formula - works in Excel but not in macro
    By tonybeo2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-28-2015, 11:25 AM
  3. [SOLVED] Excel Macro - Copy & Paste (Font) problem & Delete Last Added Rows problem
    By LennartB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2015, 06:58 AM
  4. Macro template good saved but running macro with imported data problem
    By brazilexcel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-18-2015, 10:42 PM
  5. Macro Problem with VBA need Help (copy past cells with macro and message box)
    By Nissort in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2013, 12:17 PM
  6. Problem using formulas within macro + problem with defined name.
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2011, 04:39 AM
  7. [SOLVED] Problem in updating all worksheets of a workbook using a macro that calls another macro
    By saai_ram@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2006, 01:25 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