Excel 2007 , kann mir jemand den VBA Code für ALT + Druck sagen?

...komplette Frage anzeigen

2 Antworten

Alles zu Print Screen s. folgenden Link. http://word.mvps.org/FAQS/MacrosVBA/PrtSc.htm

Bei mir funktionierte diese Version bestens:

Option Explicit

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

Sub PrintScreen()

keybdevent VKSNAPSHOT, 1, 0, 0

End Sub

ich habe diesen hier gefunden:

Code:

Option Explicit

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 KEYEVENTF_KEYUP = &H2

Private Const VK_SNAPSHOT = &H2C

Private Const VK_MENU = &H12

Sub AltPrintScreen()

keybdevent VKMENU, 0, 0, 0

keybdevent VKSNAPSHOT, 0, 0, 0

keybdevent VKSNAPSHOT, 0,

KEYEVENTF_KEYUP, 0

keybdevent VKMENU, 0, KEYEVENTF_KEYUP, 0

End Sub

sorry für die bescheuerte Formatierung!!

http://www.office-loesung.de/ftopic332570_0_0_asc.php

Was möchtest Du wissen?