Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
trying to use print screen.
Nick,
i forgot to mention....i rated you as excellent...which you deserve.... Thanks again for you effort. musa.biralo NickHK wrote: This seems to works in Excel although there some inconsistencies if - The VBE window is under the Excel window - Excel is not always returned with focus; so Appactivate Your should add error trapping also. As the API call has no return value for success, you cannot tell if there is anything valid to PasteSpecial until you try. Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _ bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Private Const VK_SNAPSHOT = &H2C Private Sub CommandButton1_Click() Dim PrevState As XlWindowState PrevState = Application.WindowState Application.WindowState = xlMinimized keybd_event VK_SNAPSHOT, 0, 0, 0 Application.WindowState = PrevState 'Excel is not always returned with focus, so AppActivate Application.Caption With ActiveSheet .Range("A1").Select .PasteSpecial Format:="Bitmap" End With End Sub NickHK "musa.biralo" wrote in message oups.com... Hi, I am trying to, 1) Minimize the excel. 2) Press "Print Screen" 3) Come back to same excel. 4) Paste it in the excel Problem is how can i send the Print Screen command...when excel is minimized there could be any application running..... Your help will highly be appreciated. Thanks musa.biralo |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
can't print data labels - on screen but don't print out | Charts and Charting in Excel | |||
Why does it not print how is it on screen? | Excel Discussion (Misc queries) | |||
Print Screen | Excel Discussion (Misc queries) | |||
print box opens in right screen of dual screen setup why | Excel Discussion (Misc queries) | |||
Print and Print Preview don't match screen | Excel Worksheet Functions |