Dear Rekan-Rekan, Mohon Bantuannya, saya mau print untuk userform dengan kertas landscape. saya pake office 2010 (64 bit). Saya peke code ini tidak bisa, mohon di koreksi. Option Explicit
Private Declare PtrSafe 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 As Long = &H2C '44 Private Const VK_LMENU As Long = &HA4 '164 Private Const KEYEVENTF_KEYUP As Long = 2 Private Const KEYEVENTF_EXTENDEDKEY As Long = 1 Private Sub CommandButton1_Click() End Sub Dim sngScrollTop As Single Dim sngScrollHt As Single Dim sngLt As Single Dim sngTp As Single Dim sngHt As Single With Me sngScrollTop = .ScrollTop sngScrollHt = .ScrollHeight sngLt = .Left sngTp = .Top sngHt = .Height .Left = 0 .Top = 0 .Height = .ScrollHeight .ScrollTop = 0 DoEvents keybd_event VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY, 0& keybd_event VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY, 0& keybd_event VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY Or KEYEVENTF_KEYUP, 0& keybd_event VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY Or KEYEVENTF_KEYUP, 0 DoEvents Selection.Paste sngScrollTop = .ScrollTop sngScrollHt = .ScrollHeight .Height = sngHt .ScrollHeight = ScrollHeight .ScrollTop = sngScrollTop .Left = sngLt .Top = sngTp End With