Vb net turn off screen updating
Can I select 4 different ranges (names are known), copy the data into an array, close the source workbook, switch back to the target sheet and copy the data from the array into the target sheet. Open(s Filename, True, True) ' Turn Screen Updating off again as this is turned on when ' Source Workbook is opened Application. Copy r Copy To ' Do formatting etc Not only does this speed up the process but it almost solves the screen updating problem I now realised that it is not Screen Updating on the source file that is a problem it is just the sorce file when opened is displayed.
Kind of depends on how often they are going back and forth between views.
Screen Updating = False in the macro but when the other Workbook is opened Screen Updating is on How can I turn off Screen Updating in the other workbook from within the calling macro? Enable Events = False If I use the watch window to look at Application. Activte line is run Unless I am missing something why not try opening the source WB, storing the data in "Get Data(i Count)" in an Array , exit the loop then ,activate This Workbook again, turnoff the sreen updating and do all the formatting work in one go by retreiving the Data stored in the Array. OK - this is a new concept which I don't quite understand.
Thanks Rick Running the code from either a button on the worksheet or from a button on a userform makes no difference here is some of the code Application. Screen Updating I can see it change to True as soon as wb is opened regardless of the second line that turns it false. The intent of the code above is to copy 4 different ranges from a source (unopened) workbook into the active workbook, then format the copied range.
This example turns off screen updating, opens Test.doc, inserts text, refreshes the screen, and then closes the document (with changes saved).
Dim rng Temp As Range Screen Updating = False Documents.