+ Reply to Thread
Results 1 to 4 of 4

Screen updating turns itself on during/after Application.Run ATPVBEAN.XLAM

Hybrid View

  1. #1
    Registered User
    Join Date
    03-06-2013
    Location
    Around the corner
    MS-Off Ver
    Excel 2010
    Posts
    3

    Post Screen updating turns itself on during/after Application.Run ATPVBEAN.XLAM

    Hi everyone,

    I have a little bit of a problem with screen updating. The problem is that screen updating turns itself on when the programme hits a particular line (in bold below). Here is the relevant part of the code:

    Sub Test
    
    Application.ScreenUpdating = False
    
    Dim x,y,z as Long
    
    x = Sheets("Calc").Range("B4").Value 
    
    row = Array("6:6","7:7")
    
    For y = LBound(row) To UBound(row)
    Sheets("Res1").Select
    Range(row(y)).Copy ([Bstrap!A5])
    
    For i = 1 To 1000
    Sheets("Bstrap").Select
    Application.Run "ATPVBAEN.XLAM!Sample", ActiveSheet.Range(Cells(5, 2), Cells(5, x + 1)), ActiveSheet.Cells(13, i + 10), "R", j_end, False
    Next i
    
    ' more code...
    
    Next y
    
    End Sub
    How can I make screen updating to stay off when/after executing " Application.Run "ATPVBAEN.XLAM!Sample" "?

    Thank you for your help!
    Last edited by an531; 06-08-2013 at 08:10 AM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Screen updating turns itself on during/after Application.Run ATPVBEAN.XLAM

    Sub Test
    
    Application.ScreenUpdating = False
    
    Dim x,y,z as Long
    
    x = Sheets("Calc").Range("B4").Value 
    
    row = Array("6:6","7:7")
    
    For y = LBound(row) To UBound(row)
    Sheets("Res1").Select
    Range(row(y)).Copy ([Bstrap!A5])
    
    For i = 1 To 1000
    Sheets("Bstrap").Select
    Application.Run "ATPVBAEN.XLAM!Sample", ActiveSheet.Range(Cells(5, 2), Cells(5, x + 1)), ActiveSheet.Cells(13, i + 10), "R", j_end, False
    Application.ScreenUpdating = False
    Next i
    
    
    ' more code...
    
    Next y
    
    End Sub
    maybe
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    03-06-2013
    Location
    Around the corner
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Screen updating turns itself on during/after Application.Run ATPVBEAN.XLAM

    Thanks for the suggestion martindwilson, but unfortunately it does not work.

  4. #4
    Registered User
    Join Date
    11-01-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    1

    Re: Screen updating turns itself on during/after Application.Run ATPVBEAN.XLAM

    Hi, I know this is an old thread but I've been having the exact same problem as an531 - whenever I use "Application.Run", screen updating switches back to true! Can anyone help?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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