+ Reply to Thread
Results 1 to 6 of 6

Spreadsheet screen flickers for a few second when using a condition

  1. #1
    wayne
    Guest

    Spreadsheet screen flickers for a few second when using a condition

    Hi

    When I use the following script in Microsoft Excel to automatically
    update a figure based on a yes/no condition in cell c20 the screen
    flickers. The value and program does work but it is very pleasant to
    watch. Can anyone help?


    Wayne


    Private Sub Worksheet_Calculate()
    Sheets("Work Order Request").Select

    If Range("c20").Value = "yes" Then
    Range("g20").Value = "=c18"
    Else
    Range("g20").Value = "Enter CBA Number"
    End If
    ' Range("g20").Value = "=c18"
    End Sub

  2. #2
    Don Guillett
    Guest

    Re: Spreadsheet screen flickers for a few second when using a condition

    application.screenupdating=false
    code
    reset to true

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "wayne" <[email protected]> wrote in message
    news:[email protected]...
    > Hi
    >
    > When I use the following script in Microsoft Excel to automatically
    > update a figure based on a yes/no condition in cell c20 the screen
    > flickers. The value and program does work but it is very pleasant to
    > watch. Can anyone help?
    >
    >
    > Wayne
    >
    >
    > Private Sub Worksheet_Calculate()
    > Sheets("Work Order Request").Select
    >
    > If Range("c20").Value = "yes" Then
    > Range("g20").Value = "=c18"
    > Else
    > Range("g20").Value = "Enter CBA Number"
    > End If
    > ' Range("g20").Value = "=c18"
    > End Sub




  3. #3
    Tom Ogilvy
    Guest

    Re: Spreadsheet screen flickers for a few second when using a condition

    Instead of setting screenupdating to false, avoid selecting the sheet:

    Private Sub Worksheet_Calculate()
    With Sheets("Work Order Request")
    If .Range("c20").Value = "yes" Then
    .Range("g20").Value = "=c18"
    Else
    .Range("g20").Value = "Enter CBA Number"
    End If
    End With
    End Sub

    If work order request is already the active sheet and
    it is the updating of the cell that bothers you, then perhaps look away.


    --
    Regards,
    Tom Ogilvy



    "wayne" <[email protected]> wrote in message
    news:[email protected]...
    > Hi
    >
    > When I use the following script in Microsoft Excel to automatically
    > update a figure based on a yes/no condition in cell c20 the screen
    > flickers. The value and program does work but it is very pleasant to
    > watch. Can anyone help?
    >
    >
    > Wayne
    >
    >
    > Private Sub Worksheet_Calculate()
    > Sheets("Work Order Request").Select
    >
    > If Range("c20").Value = "yes" Then
    > Range("g20").Value = "=c18"
    > Else
    > Range("g20").Value = "Enter CBA Number"
    > End If
    > ' Range("g20").Value = "=c18"
    > End Sub




  4. #4
    Tom Ogilvy
    Guest

    Re: Spreadsheet screen flickers for a few second when using a condition

    If the activating of the sheet is removed, the flicker seems worse with
    application.ScreenUpdating being turned off and on.

    --
    Regards,
    Tom Ogilvy

    "Don Guillett" <[email protected]> wrote in message
    news:[email protected]...
    > application.screenupdating=false
    > code
    > reset to true
    >
    > --
    > Don Guillett
    > SalesAid Software
    > [email protected]
    > "wayne" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi
    > >
    > > When I use the following script in Microsoft Excel to automatically
    > > update a figure based on a yes/no condition in cell c20 the screen
    > > flickers. The value and program does work but it is very pleasant to
    > > watch. Can anyone help?
    > >
    > >
    > > Wayne
    > >
    > >
    > > Private Sub Worksheet_Calculate()
    > > Sheets("Work Order Request").Select
    > >
    > > If Range("c20").Value = "yes" Then
    > > Range("g20").Value = "=c18"
    > > Else
    > > Range("g20").Value = "Enter CBA Number"
    > > End If
    > > ' Range("g20").Value = "=c18"
    > > End Sub

    >
    >




  5. #5
    WayneL
    Guest

    Re: Spreadsheet screen flickers for a few second when using a condition


    Thanks


    Works perfectly..


    WayneL


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!

  6. #6
    Bob Phillips
    Guest

    Re: Spreadsheet screen flickers for a few second when using a condition


    "Tom Ogilvy" <[email protected]> wrote in message
    news:uS9S%[email protected]...
    >
    > If work order request is already the active sheet and
    > it is the updating of the cell that bothers you, then perhaps look away.
    >


    Very amusing :-)



+ 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