+ Reply to Thread
Results 1 to 6 of 6

Ending Macro on the last row

  1. #1
    Forum Contributor
    Join Date
    11-05-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    155

    Ending Macro on the last row

    Hi All,

    I have the below macro's and when it runs, it sometimes adds a few thousand new rows.

    Is there a way to stop this?

    Please Login or Register  to view this content.
    Thank you.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Ending Macro on the last row

    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Ending Macro on the last row

    Hi there,

    I wonder if the situation might be getting "over-complicated" by the fact that inserting the Date values is re-triggering the Worksheet_Change event?

    See if the following single-routine version of your code does what you need:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  4. #4
    Forum Contributor
    Join Date
    11-05-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    155

    Re: Ending Macro on the last row

    Thank you both for the replies.

    Greg, yours works perfect and within an instant, thank you

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Ending Macro on the last row

    Glad to help & thanks for the feedback.

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Ending Macro on the last row

    Hi again,

    Many thanks for your very prompt feedback.

    You're welcome - glad I was able to help.

    Regards,

    Greg M


    P. S. Many thanks also for the Reputation increase - much appreciated!
    Last edited by Greg M; 09-06-2021 at 11:06 AM. Reason: P. S. added

+ 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. [SOLVED] Help with a VBA macro ending with a LOOP
    By 5h1l in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 07-31-2012, 09:58 AM
  2. MACRO In a never ending loop
    By madbrit in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-19-2012, 09:44 AM
  3. Ending a Looping Macro
    By 5150photo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2009, 07:21 PM
  4. Ending macro early
    By TedH in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-20-2009, 11:45 AM
  5. Exiting called macro on error, then ending macro caller.
    By Yappa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2008, 10:28 PM
  6. When ending a macro...
    By c991257 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2007, 02:27 PM
  7. [SOLVED] Ending a macro?
    By Paul in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2005, 05:10 AM
  8. Ending Looping Macro
    By cparaske in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-13-2005, 04:27 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