+ Reply to Thread
Results 1 to 5 of 5

Macro errors when running, but works when done step by step

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Macro errors when running, but works when done step by step

    When I run this it will break at the last line. The delete string. It is breaking because the table is not unlisting. If I go line by line then the table will unlist.

    Please Login or Register  to view this content.
    I disabled the activate line and that seems to have worked, but i don't understand why

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: Macro errors when running, but works when done step by step

    Which sheet is active when you start the code? Is it Sheet1? Which sheet is the Table on?
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Macro errors when running, but works when done step by step

    The sheet that the code is for. That is usually like the only sheet I have open at all anyways.
    Last edited by taylorsm; 04-02-2018 at 08:41 AM.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: Macro errors when running, but works when done step by step

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Macro errors when running, but works when done step by step

    Also try sticking a Doevent between the unlist and delete.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. Single step works fine but command button has errors
    By CptCrunch51 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2017, 01:07 PM
  2. VBA Code works by step by step, doesn't work by running
    By lucasar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-24-2016, 06:33 AM
  3. [SOLVED] VBA Step Into works as desired but running macro doesn't
    By smit.etha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2015, 07:47 PM
  4. [SOLVED] preventing simple zoom macro from running step by step
    By reece1984 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-11-2012, 06:13 AM
  5. shortcut key to see a macro running "step by step"
    By al007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-10-2005, 06:25 PM
  6. [SOLVED] running macro step by step different from normal run??
    By Rinze Smit in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-26-2005, 11:05 AM
  7. [SOLVED] I need step by step instructions to create a macro for 10 imbedde.
    By diana in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2005, 10:06 PM

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