+ Reply to Thread
Results 1 to 8 of 8

Msgbox is lethargic / slow!

  1. #1
    Registered User
    Join Date
    12-12-2018
    Location
    Virginia
    MS-Off Ver
    Windows x
    Posts
    5

    Msgbox is lethargic / slow!

    My msgbox and inputBox sometimes... SOMETIMES... gets really slow. There can be as much as a 5 or 6 second lag between key inputs. This problem is intermittent.

    I'm pretty advanced in my knowledge of VBA / Excel. I'm far from a beginner by any stretch of the imagination. I'm hoping someone reads this and know more about Excel's programming.

    What I've tried so far: When my VBA program runs, I start off with the typical 3 (screen updating off, calculation to manual, enable events off). I also have a debug log setup within my program to record where code the program is and at what time. These checkpoints are all over my code. That sub looks like this:

    Please Login or Register  to view this content.

    My other sub looks something like this

    Please Login or Register  to view this content.
    and my checkpoint text file records location x and y along with the long lag, but nothing in between.
    Last edited by jayplac; 01-12-2019 at 12:42 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Msgbox is lethargic / slow!

    Eh, what's the question/problem?

    PS When posting code can you please use CODE tags?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-12-2018
    Location
    Virginia
    MS-Off Ver
    Windows x
    Posts
    5

    Re: Msgbox is lethargic / slow!

    I'll edit my post momentarily with tags. My question is 'Why do I have such a lag between character entries (inputbox) or tabbing between yes and No (msgbox), or clicking ok and waiting for something to happen.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Msgbox is lethargic / slow!

    Can you post the code where this apparent 'lag' is occurring?

    PS Perhaps the problem is with your DebugCheckPoint sub which is writing to a file, which I would think might slow things down a bit.

  5. #5
    Registered User
    Join Date
    12-12-2018
    Location
    Virginia
    MS-Off Ver
    Windows x
    Posts
    5

    Re: Msgbox is lethargic / slow!

    It's a very long and arduous code which calls on many other subs. Are you looking for something specific?

    The debug checkpoint is extremely fast. Please take a minute and try it. However, next time my computer slows down, I will circumvent the checkpoint and see what happens.

    Update: The program is acting up at the moment and I placed 'EXIT SUB' in the second line of the debugCheckpoint with no avail. The problem still exists.
    Last edited by jayplac; 01-12-2019 at 01:57 PM.

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Msgbox is lethargic / slow!

    Do you get the same problem with input boxes in a new workbook without all your code?

  7. #7
    Registered User
    Join Date
    12-12-2018
    Location
    Virginia
    MS-Off Ver
    Windows x
    Posts
    5

    Re: Msgbox is lethargic / slow!

    Not sure. I'll test it the next time it happens.

  8. #8
    Registered User
    Join Date
    12-12-2018
    Location
    Virginia
    MS-Off Ver
    Windows x
    Posts
    5

    Re: Msgbox is lethargic / slow!

    On the suggestion of Kyle123, I tested the msgbox on a new sheet while experiencing the problem. It works fine. Though that got me thinking that one of the parameters, which gets set to false/manual at the beginning of the sub was messing with me. The problem is seemingly fixed by turning application.screenupdating back to true while dealing with the message box.

    Though it wasn't your suggestion, it led to the solution; thanks Kyle.

+ 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. Slow macro, slow pc or wrong code?
    By corky81 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-24-2018, 05:58 AM
  2. Macro to capture MsgBox prompt to a string variable but ignore the MsgBox
    By BuglerDobbs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-07-2015, 10:56 AM
  3. Macro is running real slow and makes navigating the worksheet really slow after execution.
    By MichWolverines in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2013, 04:29 PM
  4. [SOLVED] Problem with VBA Editor uses lower case on some lines (ex. msgbox instead of MsgBox)
    By stubbsj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-14-2013, 06:59 PM
  5. [SOLVED] slow computer (slow clipboard) breaks my macro
    By twilsonco in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2013, 09:16 PM
  6. Slow code msgbox yes no
    By D_Rennie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2009, 10:54 AM
  7. Excel seems to become lethargic
    By Paul987 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-22-2005, 11:05 PM

Tags for this Thread

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