View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bill Choy[_2_] Bill Choy[_2_] is offline
external usenet poster
 
Posts: 1
Default How to capture screen through VBA?

Hi,

I'm doing a program for generating report in excel. One of
the steps is capture the active window screen and paste it
in a worksheet. I have to push Alt-PrintScreen to capture
screen before running the report generation program. The
following code is used to copy the screen capture.

Set NewWb = Workbooks.Add
NewWb.Sheets(3).Activate
Sheets("Sheet3").Select
Range("A1").Select
ActiveSheet.Paste

I don't want to push Alt-PrintScreen every time. Are there
any methods to copy the screen automatically?

Best regards
Bill