+ Reply to Thread
Results 1 to 3 of 3

Script crashes Excel

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    Skanderborg, Denmark
    MS-Off Ver
    365
    Posts
    14

    Script crashes Excel

    Hi,

    I have created the below script.

    Please Login or Register  to view this content.
    Unfortunately it keeps crashing Excel. Is this because the for loop makes changes within the KeyCells range? I've tried making it write outside the range, and that seems to work just fine.
    If I need the function to write within the KeyCells range, how do I do this without it crashing (triggering the scripts again, I guess)?

    Thanks in advance.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,911

    Re: Script crashes Excel

    Try this:

    Please Login or Register  to view this content.
    Rory

  3. #3
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: Script crashes Excel

    Hi dixib,

    You could try disabling (Application. EnableEvents = False) and enabling it after:
    Please Login or Register  to view this content.
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

+ 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. script to run the macro from Vb script with out opening the excel file
    By chandanp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2021, 03:33 AM
  2. Script for optional column entry crashes Excel
    By guest267 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-24-2018, 09:29 AM
  3. Excel VBA Script Crashes When Refreshing Power Queries Using Task Scheduler
    By beaglesBuddy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2017, 01:03 AM
  4. Execute VB Script/ SAP Script from Excel
    By ramkrishna1111 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2015, 01:54 PM
  5. Integrating Mainframe emulator script with excel's vba script
    By Himanshu Mishra in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-07-2012, 10:30 AM
  6. Create VBA script to short, dedicated button in excel for script?
    By realized in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-01-2009, 11:54 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