Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Stop the screen from Flashing

  1. #1
    Board Regular
    Join Date
    May 2002
    Location
    Ipswich, Suffolk, England
    Posts
    136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have the following code

    Dim Message, Title, Default, MyValue
    Range("c6:g17").Select
    Selection.Clear
    Call boarders
    Do
    Message = "Please enter type of expenditure"
    Title = "Please enter type of expenditure"
    Default = ""
    Range("f4") = InputBox(Message, Title, Default)
    MyValue = Range("containing2")
    Sheets("Edited Iprocurement lookup").Select
    Selection.AutoFilter field:=2, Criteria1:="*", Operator:=xlAnd
    Selection.AutoFilter field:=3, Criteria1:="*", Operator:=xlAnd
    Selection.AutoFilter field:=2, Criteria1:=MyValue, Operator:=xlAnd
    Range("A1:B66").Select
    Selection.Copy
    Sheets("User requested").Select
    Range("C5").Select
    ActiveSheet.Paste
    Call boarders
    If Range("c6") = "" Then
    If MsgBox("You have entered an incorrect description, do you want to continue?", vbRetryCancel + vbQuestion) = vbRetry Then
    Range("c6") = ""
    Else
    Range("C6") = "Quit By User"
    End If
    Else

    End If
    Loop Until Range("c6") <> ""
    Range("C6:D18").Select
    Selection.Sort Key1:=Range("D6"), Order1:=xlAscending, Header:=xlGuess, _
    OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    Range("C5").Select


    Is it possible to stop the screen from flicking from the sheet user requested to Iprocurment edited ?

    Thanks in advance

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try adding these two lines...



    Application.ScreenUpdating = False '########################

    Dim Message, Title, Default, MyValue
    Range("c6:g17").Select
    Selection.Clear
    Call boarders
    Do
    Message = "Please enter type of expenditure"
    Title = "Please enter type of expenditure"
    Default = ""
    Range("f4") = InputBox(Message, Title, Default)
    MyValue = Range("containing2")
    Sheets("Edited Iprocurement lookup").Select
    Selection.AutoFilter field:=2, Criteria1:="*", Operator:=xlAnd
    Selection.AutoFilter field:=3, Criteria1:="*", Operator:=xlAnd
    Selection.AutoFilter field:=2, Criteria1:=MyValue, Operator:=xlAnd
    Range("A1:B66").Select
    Selection.Copy
    Sheets("User requested").Select
    Range("C5").Select
    ActiveSheet.Paste
    Call boarders
    If Range("c6") = "" Then
    If MsgBox("You have entered an incorrect description, do you want to continue?", vbRetryCancel + vbQuestion) = vbRetry Then
    Range("c6") = ""
    Else
    Range("C6") = "Quit By User"
    End If
    Else

    End If
    Loop Until Range("c6") <> ""
    Range("C6:D18").Select
    Selection.Sort Key1:=Range("D6"), Order1:=xlAscending, Header:=xlGuess, _
    OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    Range("C5").Select

    Application.ScreenUpdating = True '########################



    Tom

    _________________
    Found a solution? If so, please post again so members of this board can spend their time helping others. Better still, edit your topic(intitial post), by tagging on a word or phrase such as, "Problem Solved", or "Resolved". Thanks for being courteous!



    [ This Message was edited by: TsTom on 2002-05-10 00:01 ]

  3. #3
    Board Regular
    Join Date
    May 2002
    Location
    Ipswich, Suffolk, England
    Posts
    136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    thanks, it worked great

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •