+ Reply to Thread
Results 1 to 6 of 6

Simple macro - Excel does not respond, black screen and long run time

  1. #1
    Forum Contributor
    Join Date
    07-08-2014
    Location
    israel
    MS-Off Ver
    office 365
    Posts
    101

    Simple macro - Excel does not respond, black screen and long run time

    hi,

    Trying to run a simple macro

    The macro works but it takes 3-4 minutes to perform the operation

    Immediately upon running the macro a black screen opens and a message that Excel is not responding

    Asks for a recommendation on how to make the Excel respond and the running time be short

    Thanks in advance

    the macro:

    Application.ScreenUpdating = False
    Application.Calculation = xlManual

    LastRow = 500 'have 500 rows in the data

    For i = 1 To LastRow 'loop through each row and check for required criteria

    'To hide all the rows with the Even Number in Column A

    If IsNumeric(Range("A" & i)) = True Then
    If Range("A" & i) Mod 2 = 0 Then Rows(i).EntireRow.Hidden = True
    End If

    Next

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Simple macro - Excel does not respond, black screen and long run time

    Try with:

    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    07-08-2014
    Location
    israel
    MS-Off Ver
    office 365
    Posts
    101

    Re: Simple macro - Excel does not respond, black screen and long run time

    hanks
    I tried different conditions like:

    If Cells(J, "A") = True Then rows(J).EntireRow.Hidden = False


    The main problem is that the Excel does not respond, black screen and long running time

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Simple macro - Excel does not respond, black screen and long run time

    We have no idea what you got in col. A.
    Maybe you can attached your file, please check yellow banner at the top of the page.
    Otherwise:
    1.JPG

  5. #5
    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,366

    Re: Simple macro - Excel does not respond, black screen and long run time

    There's nothing wrong with the code. It should be virtually instantaneous.

    Please Login or Register  to view this content.
    Do you have other code in the workbook?

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    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


  6. #6
    Forum Contributor
    Join Date
    07-08-2014
    Location
    israel
    MS-Off Ver
    office 365
    Posts
    101

    Re: Simple macro - Excel does not respond, black screen and long run time

    A sample file is attached

    In this file the macro runs in a very short time and everything is fine

    In the original file I work with (contains a lot of worksheets and formulas) the runtime is very long,
    the Excel does not respond and the screen is black.

    The problem is probably as fundamental as how to handle memory management, giving priority to Excel
    Attached Files Attached Files

+ 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. VBA for sampling Size calculation. This takes so long but not respond.
    By Montecarlo1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-04-2021, 01:54 AM
  2. Excel Formula too long and goes 'black'
    By tuckerpmission in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-05-2016, 03:34 PM
  3. [SOLVED] Simple macro takes a long time to execute
    By jcfransen in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-11-2015, 04:31 AM
  4. [SOLVED] Issue - IE8 taking long to respond
    By arlu1201 in forum Suggestions for Improvement
    Replies: 2
    Last Post: 03-16-2012, 04:08 AM
  5. Excel taking too long to respond
    By jacob@thepenpoint in forum Excel General
    Replies: 2
    Last Post: 03-04-2011, 11:06 AM
  6. Long running macro and screen update
    By James in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-13-2005, 09:05 AM
  7. [SOLVED] EXCEL - Worksheet in colour but on screen black only?
    By Four Jays in forum Excel General
    Replies: 1
    Last Post: 05-29-2005, 06:05 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