LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Application.ScreenUpdating = False

Tim

You use Activate and Select so the Windows will show despite .ScreenUpdating = False.

Combine the functions of copy - paste to one line
'Copy the YEAR - in one line with space between ....Copy Workbooks.....
Workbooks(OldFileName).Sheets("Company").Range("K3 :N6").Copy Workbooks(NewFileName).Sheets("Company").Range("K3 :N6")

it's also faster

Pieter


"Tim" wrote in message om...
| I have a macro that opens another excel file and copes info from it
| into the file that is running the macro. The info is copies from 20
| different sheets and is copied into 20 different sheets. I use
| Application.ScreenUpdating = False but the screen still flashes and is
| updated every time I go from workbook to workbook. What can I do to
| the code below that will update the screen only after all info has
| been copies?
|
|
|
|
| Application.ScreenUpdating = False
| Application.DisplayAlerts = False
|
| 'Copy the YEAR
| Windows(OldFileName).Activate
| Sheets("Company").Select
| Range("K3:N6").Copy
|
| Windows(NewFileName).Activate
| Sheets("Company").Select
| Range("K3:N6").Select
| ActiveSheet.Paste
|
| 'Copy the Company Info
| Windows(OldFileName).Activate
| Sheets("Company").Select
| Range("F9:I16").Copy
|
| Windows(NewFileName).Activate
| Sheets("Company").Select
| Range("F9:I16").Select
| ActiveSheet.Paste
|
|
| Application.CutCopyMode = False
|
| 'Close Old File
| Windows(OldFileName).Activate
| ActiveWindow.Close


 
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
Why does Selection.PasteSpecial toggle Application.ScreenUpdating OssieMac Excel Worksheet Functions 2 August 4th 09 12:05 AM
How to set Application.ScreenUpdating = False for Gen use David_Williams_PG () Excel Discussion (Misc queries) 1 August 15th 06 12:06 PM
What does ScreenUpdating = False do? Judy Ward Excel Worksheet Functions 5 July 9th 05 09:25 AM
Application.ScreenUpdating function question Fleone Excel Worksheet Functions 2 May 12th 05 01:36 AM


All times are GMT +1. The time now is 09:18 AM.

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

About Us

"It's about Microsoft Excel"