ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to capture screen through VBA? (https://www.excelbanter.com/excel-programming/304803-how-capture-screen-through-vba.html)

Bill Choy[_2_]

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

Norman Jones

How to capture screen through VBA?
 
Hi Bill,

Perhaps this recent thread may be of relevant interest.

http://tinyurl.com/5j5u5

---
Regards,
Norman



"Bill Choy" wrote in message
...
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




Tim Coddington

How to capture screen through VBA?
 
Snaggit did look interesting
I wonder if there is any way to use 'SendKeys' to send Alt PrintScreen to
Windows?

Syntax

SendKeys string[, wait]

That might be just what the doctor ordered without having to access
another package.

"Norman Jones" wrote in message
...
Hi Bill,

Perhaps this recent thread may be of relevant interest.

http://tinyurl.com/5j5u5

---
Regards,
Norman



"Bill Choy" wrote in message
...
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






keepITcool

How to capture screen through VBA?
 


funny though it is:

VB6 can simply sendkeys {PrtSc}
VBA cant do it..
(Word has a workaround)

see API code in referenced thread.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Tim Coddington wrote :

Snaggit did look interesting
I wonder if there is any way to use 'SendKeys' to send Alt
PrintScreen to Windows?

Syntax

SendKeys string[, wait]

That might be just what the doctor ordered without having to access
another package.



All times are GMT +1. The time now is 03:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com