+ Reply to Thread
Results 1 to 6 of 6

repeated screen "blinking" problem when running program - please help!

  1. #1
    Registered User
    Join Date
    06-02-2005
    Posts
    10

    repeated screen "blinking" problem when running program - please help!

    Hello All!!

    I have created a small VB program in excel to calculate a number based on about 5-6 given numerical inputs. This program also uses IF...Then....ElseIf logic by taking some of the inputs and based on the values, routing the inputs to different equation sets for calculation. Anyway, I have setup two ways for Excel to calculate the correct output: one, is by pushing a button that prompts each numeric input in an application box and second, by inputting the values into the correct cells manually and then clicking on the output text box (the code is based off of the "GotFocus" feature for the textbox). However, here is the problem!! When the user inputs using the button method everything works fine. However, when inputting using the manual method into each cell and then clicking on the textbox, the screen starts to rapidly blink over and over again and will not stop until the user clicks somewhere else on the screen. The program then spits out the value into the textbox. The answer is right but this is dreadfully annoying. DOES ANYONE KNOW HOW TO KEEP THIS BLINKING FROM HAPPENING?

  2. #2
    Registered User
    Join Date
    06-02-2005
    Posts
    10
    if anyone has any ideas??.....................................

  3. #3
    STEVE BELL
    Guest

    Re: repeated screen "blinking" problem when running program - please help!

    Without seeing your code I can only guess.

    Maybe you have some kind of loop happening in your code?
    If there are event macros they could be firing repeatedly:

    use - prevent events being fired during code
    Application.EnableEvents = False
    [ your code ]
    Application.EnableEvents = True

    Maybe your code is going through a number of steps and causing the screen to
    change

    use - to freeze the screen until the code is complete
    Application.ScreenUpdating = False
    [ your code ]
    Application.ScreenUpdating = True

    --
    steveB

    Remove "AYN" from email to respond
    "gunman" <[email protected]> wrote in
    message news:[email protected]...
    >
    > if anyone has any ideas??.....................................
    >
    >
    > --
    > gunman
    > ------------------------------------------------------------------------
    > gunman's Profile:
    > http://www.excelforum.com/member.php...o&userid=23994
    > View this thread: http://www.excelforum.com/showthread...hreadid=376142
    >




  4. #4
    Gary Keramidas
    Guest

    Re: repeated screen "blinking" problem when running program - please help!

    use this before your code
    Application.ScreenUpdating = False

    and this after it is done
    Application.ScreenUpdating = True

    --


    Gary


    "gunman" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hello All!!
    >
    > I have created a small VB program in excel to calculate a number based
    > on about 5-6 given numerical inputs. This program also uses
    > IF...Then....ElseIf logic by taking some of the inputs and based on the
    > values, routing the inputs to different equation sets for calculation.
    > Anyway, I have setup two ways for Excel to calculate the correct
    > output: one, is by pushing a button that prompts each numeric input in
    > an application box and second, by inputting the values into the correct
    > cells manually and then clicking on the output text box (the code is
    > based off of the "GotFocus" feature for the textbox). However, here is
    > the problem!! When the user inputs using the button method everything
    > works fine. However, when inputting using the manual method into each
    > cell and then clicking on the textbox, the screen starts to rapidly
    > blink over and over again and will not stop until the user clicks
    > somewhere else on the screen. The program then spits out the value into
    > the textbox. The answer is right but this is dreadfully annoying. *DOES
    > ANYONE KNOW HOW TO KEEP THIS BLINKING FROM HAPPENING?*
    >
    >
    > --
    > gunman
    > ------------------------------------------------------------------------
    > gunman's Profile:
    > http://www.excelforum.com/member.php...o&userid=23994
    > View this thread: http://www.excelforum.com/showthread...hreadid=376142
    >




  5. #5
    Registered User
    Join Date
    06-02-2005
    Posts
    10

    give it a try.....

    Thanks for the input on how to stop the blinking problem. Ill give it a try and report back if it worked or not.
    Gunman

  6. #6
    Registered User
    Join Date
    06-02-2005
    Posts
    10

    solved!

    Thanks guys. The application.enable events feature worked great and everything is solved. Thanks again

    Gunman

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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