Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why does Selection.PasteSpecial toggle Application.ScreenUpdating | Excel Worksheet Functions | |||
How to set Application.ScreenUpdating = False for Gen use | Excel Discussion (Misc queries) | |||
What does ScreenUpdating = False do? | Excel Worksheet Functions | |||
Application.ScreenUpdating function question | Excel Worksheet Functions |