Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Take a screenshot

Thanks!
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Take a screenshot

Thanks a lot
And can I save the image then?


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pasting Screenshot in shared workbook Karthik Excel Discussion (Misc queries) 4 April 6th 07 03:26 PM
Testing for Screenshot Tim Childs Excel Programming 1 September 13th 03 03:09 PM
Automatic screenshot in Excel Jan K. Excel Programming 10 August 16th 03 03:34 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"