Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Turning off Screen Refresh

Is there any way to turn off screen refresh while running
a program in VB?

Sullivan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Turning off Screen Refresh

A VERY often asked question. Did you try the archives first?

"sullivan" wrote in message
...
Is there any way to turn off screen refresh while running
a program in VB?

Sullivan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Turning off Screen Refresh

Sullivan,

Application.screenupdating=false
.... code here ...
Application.screenupdating=true

Cheers, Pete
-----Original Message-----
Is there any way to turn off screen refresh while running
a program in VB?

Sullivan
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Turning off Screen Refresh

' turn it off
Application.ScreenUpdating = False

' turn it back on
Application.ScreenUpdating = True

--
Regards,
Tom Ogilvy

"sullivan" wrote in message
...
Is there any way to turn off screen refresh while running
a program in VB?

Sullivan



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Turning off Screen Refresh

Sullivan,

Use something like the following:

Application.ScreenUpdating = False
' your code here
Application.ScreenUpdating = True

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com

"sullivan" wrote in message
...
Is there any way to turn off screen refresh while running
a program in VB?

Sullivan





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Turning off Screen Refresh

You might want to put this in a class module as follows.

Add a a class module and name it SuspendRefresh. The code is:

Option Explicit

Private Sub Class_Initialize()
Application.ScreenUpdating = False
End Sub

Private Sub Class_Terminate()
Application.ScreenUpdating = True
End Sub

' End of class module

In your sub or function, do the following
Sub DemoScreenUpdateClass()
dim su as SuspendRefresh

' when ready to suspend the screen refresh
set su = new SuspendRefresh

' when ready to resume screen refresh
set su = Nothing

' if you don't want to resume screen refresh until the Sub or Function
ends, do nothing. VBA will
' automatically perform the "set su = Nothing" for you on Exit Sub or Exit
Function
End Sub


Mike.

"Chip Pearson" wrote in message
...
Sullivan,

Use something like the following:

Application.ScreenUpdating = False
' your code here
Application.ScreenUpdating = True

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com

"sullivan" wrote in message
...
Is there any way to turn off screen refresh while running
a program in VB?

Sullivan





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Turning off Screen Refresh

Application.ScreenUpdating = False
Your Macro
Application.ScreenUpdating = True

"sullivan" wrote in message
...
Is there any way to turn off screen refresh while running
a program in VB?

Sullivan



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Turning off Screen Refresh

Sullivan,

I think you are looking for the

application.screenupdating=false

command.

Best regards,
Kevin

"sullivan" wrote in message
...
Is there any way to turn off screen refresh while running
a program in VB?

Sullivan



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen Refresh Michael H Excel Discussion (Misc queries) 4 November 8th 05 04:46 PM
Screen refresh problem. Nigel Brown[_2_] Excel Programming 0 September 17th 03 03:21 PM
Screen refresh problem. Nigel Brown[_2_] Excel Programming 0 September 17th 03 02:15 PM
Screen Refresh after minimize Kent Prokopy[_3_] Excel Programming 0 August 22nd 03 06:34 PM
Turning off all screen updates during a Solver routine Tony Scullion Excel Programming 3 August 15th 03 08:09 PM


All times are GMT +1. The time now is 07:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"