+ Reply to Thread
Results 1 to 5 of 5

VBA is Crashing Excel

  1. #1
    Registered User
    Join Date
    12-08-2017
    Location
    Venice, Florida
    MS-Off Ver
    2016
    Posts
    22

    VBA is Crashing Excel

    Hi

    I am attempting to add the username and date when an individual changes/updates the contents of a row within a spreadsheet. The code works and when you try to do anything else it crashed Excel. Below is the script that I'm using.

    Please Login or Register  to view this content.
    Thanks Alan
    Last edited by alansidman; 02-20-2018 at 03:58 PM.

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: VBA is Crashing Excel

    You should turn off Application.EnableEvents at start of your code and then turn it back on at the end.

    Otherwise, since your code makes change to cell (i.e. sheet). It goes into infinite loop on itself.

    Please Login or Register  to view this content.
    Edit: Please wrap your code in code tag (# button in the menu).
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    12-08-2017
    Location
    Venice, Florida
    MS-Off Ver
    2016
    Posts
    22

    Re: VBA is Crashing Excel

    I've used Application.UserName and while the code works it still crashes Excel.

  4. #4
    Registered User
    Join Date
    12-08-2017
    Location
    Venice, Florida
    MS-Off Ver
    2016
    Posts
    22

    Re: VBA is Crashing Excel

    Worked perfectly. Thanks so much! Alan

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: VBA is Crashing Excel

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Excel crashing when trying to view code before macro run; not crashing after first run
    By goonerforlyf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2015, 05:27 PM
  2. Excel Crashing
    By JenLS in forum Excel General
    Replies: 3
    Last Post: 06-15-2015, 12:00 PM
  3. Excel keeps crashing
    By robolma in forum Excel General
    Replies: 1
    Last Post: 03-28-2015, 11:57 AM
  4. Vba is crashing excel SOMETIMES
    By humboldtguy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-15-2014, 12:55 AM
  5. Excel crashing
    By 007juk in forum Excel General
    Replies: 1
    Last Post: 05-17-2007, 07:09 AM
  6. [SOLVED] excel crashing
    By robin in forum Excel General
    Replies: 6
    Last Post: 08-03-2005, 09:15 AM
  7. [SOLVED] Add-in crashing Excel
    By big t in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-20-2005, 12: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