VB for Excel to suspend window updating while updating another workbook
Posted on 2011-03-07
I have an Excel workbook that opens a second workbook copies range(s) of info from the 1st workbook finds the last line of input on the 2nd workbook and pastes the values of the info to that 2nd workbook.
It is annoying to see the program open the 2nd workbook and then copy the info to it and save and close that 2nd workbook.
Is there a way in VB to open the second WB in minimized state and do the copy, paste, save and close of that 2nd WB without it flashing on the screen?
I have tried both:
Application.ScreenUpdating = False
Application.WindowState = Excel.XlWindowState.xlMinimized
both ways eventually flash the file on the screen.