Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I ensure my Excel VBA application doesn't display each sheet as it processes them ?

Posted on 2014-11-12
3
Medium Priority
?
86 Views
Last Modified: 2014-11-12
Hi All,

My Excel application reads rows from one workbook and copies them to another. In fact, it processes each sheet in turn and depending on certain conditions selectively copies/pastes the rows to corresponding sheets.

The procedure opens an input workbook and an output workbook and amongst all this activity, the application switches from one sheet to another, opening a file and displaying the sheet that is currently active.

How do I stop this ? I want the procedure to run from the Menu sheet (click of a button) and all processing to be done in the background with the Menu sheet continually displayed until the end of the procedure.

I tried inserting Activate statements throughout the procedure but it got into a mess.

Is there a standard command which I can employ for this functionality.

Thanks
Toco
0
Comment
Question by:Tocogroup
[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 31

Accepted Solution

by:
gowflow earned 2000 total points
ID: 40437420
Put this in the start of the procedure:

'---> Disable Events
With Application
    .EnableEvents = False
    .ScreenUpdating = False
    .DisplayAlerts = False
End With

Open in new window



and just before the end of the sub put this
'---> Enable Events
With Application
    .EnableEvents = True
    .ScreenUpdating = True
    .DisplayAlerts = True
End With

Open in new window


This will ensure no fliquering and that you macro will execute the procedure and will not go to other events before it finishes

gowflow
0
 

Author Closing Comment

by:Tocogroup
ID: 40437554
Ah yes now I remember ! Thanks for that. Works perfectly
0
 
LVL 31

Expert Comment

by:gowflow
ID: 40437563
Great !
gowflow
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

688 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