Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Take a screenshot
Hi
I was just wondering is there a chance to take a screenshot in Excel through VBA? I'm using Office XP running on Windows XP Appreciate any help Thanks Eugene. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Take a screenshot
Take a look at this Microsoft KB article:
http://support.microsoft.com/?kbid=240653 -- Rob van Gelder - http://www.vangelder.co.nz/excel "Eugene" wrote in message ... Hi! I was just wondering is there a chance to take a screenshot in Excel through VBA? I'm using Office XP running on Windows XP. Appreciate any help. Thanks, Eugene. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Take a screenshot
A shorter version of the code on MSDN that will copy the screen to th
clip board. If you just add the declarations at the start you can the just add the keybd_event to your code. Duncan Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo A Long) Public Const VK_SNAPSHOT = &H2C Sub PrintScreen() keybd_event VK_SNAPSHOT, 0, 0, 0 End Su -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Take a screenshot
Thanks!
|
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Take a screenshot
Thanks a lot
And can I save the image then? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Take a screenshot
''''Print Screen
Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo A Long) Public Const VK_SNAPSHOT = &H2C ''''End Print Screen Sub SaveScreen() Dim gsChart As Chart keybd_event VK_SNAPSHOT, 0, 0, 0 Set gsChart = ThisWorkbook.Sheets.Add(Type:=xlChart) ActiveSheet.Paste gsChart.Export Filename:="C:\ABC", FilterName:="GIF" End Sub Will do the jo -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pasting Screenshot in shared workbook | Excel Discussion (Misc queries) | |||
Testing for Screenshot | Excel Programming | |||
Automatic screenshot in Excel | Excel Programming |