?
Solved

{WINDOWSOFF}  for Excel?

Posted on 1998-09-02
3
Medium Priority
?
206 Views
Last Modified: 2012-06-27
For Excel 7.0a macros, is there an equivalent to Lotus 1-2-3's {WINDOWSOFF} and {WINDOWSON} pair?  They freeze and unfreeze the display while the macro is running (to save execution time, and to avoid annoying the user with flashing screen activity). I tried ActiveWindow.Visible = False, but then the next command (e.g., Range("A2").Select) gives an error -- as if the workbook did not exist. Is it even possible to work on a sheet when it is not visible?  
0
Comment
Question by:EDC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Expert Comment

by:tuvi
ID: 1613407
Use these:

Application.ScreenUpdating = False 'turn off
Application.ScreenUpdating = True ' turn on

If the workbook is hidden, you have set variables to refer to your ranges before the workbook is hidden.

But if you can turn off screen display refresh, you probably don't need the hidden method.
0
 
LVL 5

Accepted Solution

by:
tuvi earned 280 total points
ID: 1613408
Use these:

Application.ScreenUpdating = False 'turn off
Application.ScreenUpdating = True ' turn on

If the workbook is hidden, you have set variables to refer to your ranges before the workbook is hidden.

But if you can turn off screen display refresh, you probably don't need the hidden method.

0
 

Author Comment

by:EDC
ID: 1613409
Fantastic!  Spot on; it works great.  
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question