§Úªºn¨D¬O
¥´¶}Àɮ׮ɧYÂ^¨ú¤@±i«Ì¹õ¹Ï
(ºI«Ì«e¶·¥ý±NEXCELµøµ¡ÁY¦Ü³Ì¤p¥HÅã²{nºI«Ìªºµe±)
¨Ã±N¨ä¶K¨ìA1
¥H«á¨C¤p®ÉÂ^¨ú¤@±i«Ì¹õ¹Ï
(ºI«Ì«e¤@¼Ë¶·¥ý±NEXCELµøµ¡ÁY¦Ü³Ì¤p
¤U±i¹Ï«h¶K¦Ü³Ì¾A¦X¤§°ª«×¤§¦æ(ºò±µ«e¤@±i¹Ï)
¨Ò¦p²Ä¤@±i¹Ï¶Kº¡A1:K20
²Ä¤G±i¶K¨ìA21
¤£ª¾¦p¦ó¹F¦¨
Emily_Li ¦^ÂÐ- Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal _
- bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
- Private Const VK_KEYUP = &H2
- Private Const VK_SNAPSHOT = &H2C
- Private Const VK_MENU = &H12
- Dim ws As Worksheet
- Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" _
- (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
- Global Const SW_MAXIMIZE = 3
- Global Const SW_SHOWNORMAL = 1
- Global Const SW_SHOWMINIMIZED = 2
- Sub Print_Screen()
- keybd_event VK_MENU, 0, 0, 0
- DoEvents
- keybd_event VK_SNAPSHOT, 0, 0, 0
- DoEvents
- keybd_event VK_SNAPSHOT, 0, VK_KEYUP, 0
- DoEvents
- keybd_event VK_MENU, 0, VK_KEYUP, 0
- DoEvents
- Set ws = ActiveSheet
- ws.Paste Destination:=ws.Range("A1")
- DoEvents
- End Sub
½Æ»s¥N½X µ²ªG»Pn¨D¦³¸¨®t¤º
³o¥N½X¬OÂ^¨úexcelªºµe±
§Úªºn¨D¬O
¥´¶}Àɮ׮ɧYÂ^¨ú¤@±i«Ì¹õ¹Ï
(ºI«Ì«e¶·¥ý±NEXCELµøµ¡ÁY¦Ü³Ì¤p¥HÅã²{nºI«Ìªºµe±)
¥ç§Y¬OÂ^¨ú¥t¤@Ó¥¿©óµøµ¡³Ì¤W¼h°õ¦æªºµ{¦¡µe±¦Ó¤£¬OÂ^¨úexcelªºµe±
¨Ã±N¨ä¶K¨ìA1
¥H«á¨C¤p®ÉÂ^¨ú¤@±i«Ì¹õ¹Ï
(ºI«Ì«e¤@¼Ë¶·¥ý±NEXCELµøµ¡ÁY¦Ü³Ì¤p)
¤£ª¾¯à§_§ï§ï
hsieh¦^ÂÐ:
¨Ì¼Ëµe¸¬Äª
§Q¥ÎEmily_Li «e½úµ{¦¡½Xקï- Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal _
- bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
- Private Const VK_KEYUP = &H2
- Private Const VK_SNAPSHOT = &H2C
- Private Const VK_MENU = &H12
- Dim ws As Worksheet
- Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" _
- (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
- Global Const SW_MAXIMIZE = 3
- Global Const SW_SHOWNORMAL = 1
- Global Const SW_SHOWMINIMIZED = 2
- Sub Print_Screen()
- keybd_event VK_MENU, 0, 0, 0
- DoEvents
- Application.WindowState = xlMinimized
- Application.Wait Now + TimeValue("00:00:05")
- keybd_event VK_SNAPSHOT, 0, 0, 0
- DoEvents
- keybd_event VK_SNAPSHOT, 0, VK_KEYUP, 0
- DoEvents
- keybd_event VK_MENU, 0, VK_KEYUP, 0
- DoEvents
- Application.WindowState = xlMaximized
- Set ws = ActiveWorkbook.ActiveSheet
- ws.Paste Destination:=ws.Range("A1")
- DoEvents
- Application.OnTime Now + TimeValue("01:00:00"), "Print_Screen"
- End Sub
½Æ»s¥N½X |