Saturday, February 5, 2011

How can I copy an Excel sheet into a workbook whose windows are not visible?

source.Sheets(RevisionHistory).Copy before:=target.Sheets(1)

This does not work when all the windows for the 'target' workbook are not visible. When Visible=True for them, then it works.

The easy answer is just to make them visible. But, they are being worked on and it a problem for the user to see all that activity.

  • Try Application.ScreenUpdating = False before making the sheet temporarily visible. Remember to set it back to True again :-)

0 comments:

Post a Comment