VBA ³]©w¿é¤Jªk(¤¤^¤åÁä½L)
- ©«¤l
- 519
- ¥DÃD
- 54
- ºëµØ
- 0
- ¿n¤À
- 595
- ÂI¦W
- 259
- §@·~¨t²Î
- win 10
- ³nÅ骩¥»
- []
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-3-19
- ³Ì«áµn¿ý
- 2024-11-27
|
VBA ³]©w¿é¤Jªk(¤¤^¤åÁä½L)
½Ð°Ýþ¦ì¤j¤j«ü¾É¤@¤U
¦p¦ó¦bVBA¤¤³]©wÅܧó¿é¤Jªkªº¤èªk
ÁÂÁÂ¥ý |
|
|
|
|
|
|
- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
½Ð°Ýþ¦ì¤j¤j«ü¾É¤@¤U
¦p¦ó¦bVBA¤¤³]©wÅܧó¿é¤Jªkªº¤èªk
ÁÂÁÂ¥ý
Scott090 µoªí©ó 2015-4-8 15:47
¥H Windows 8 ¨Ó»¡¥i¥H³o¼Ë¹ê²{ : (XP ³]©w¤è¦¡Ãþ¦ü, ½Ð¦Û¦æ°Ñ·Ó³]©w)
|
|
|
|
|
|
|
- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¥»©«³Ì«á¥Ñ luhpro ©ó 2015-4-11 06:52 ½s¿è
Sendkeys ¥¨¶°ªº³¯z¦¡
§Úªº¨t²Î¬O Win 7 ·f°t Excel 2003 »P Excel 2013 ´ú¸Õ¹L³£¥i¥H¥¿±`¹B§@³á.
¦]¬°§Ú¨S¦³ Win 8,
¤£¯à´ú¸Õ¦bWin 8¤¤³o¨Ç½Æ¦X«öÁ䪺¤ÏÀ³¬O§_¦³®t§O.
³Ì²³æªº½T»{¤è¦¡¬O§A¥i¥H¶} Word:
'³oÓ¨C°õ¦æ¤@¦¸´N¥u·|¦Aª¬ºA A»PB ¥æ´«¡A¤£·|¬O¯à³Q´x´¤ªºª¬ºA
SendKeys "^ ", True
¦¹¶µ½Æ¦X«öÁä¬O Ctrl + Space(ªÅ¥ÕÁä) , ¥\¯à¬O¦b ¿é¤J^¤å¼Ò¦¡ »P ¿é¤J¤¤¤å¼Ò¦¡ ¶¡¨Ó¦^¤Á´«.
¤§«áª½±µ¦bÁä½L¤W«öµÛ Ctrl Á䤣©ñ,
¦A«ö¤@¤U ªÅ¥Õ Áä,
±µµÛ©ñ±¼ Ctrl Áä,
¬Ý¿é¤Jªk¤Á´«¬O§_¥¿±`,
'³oÓ¨S¤ÏÀ³
SendKeys "^+1", True
¦¹¶µ½Æ¦X«öÁä¬O Ctrl + Shift + 1 , ¨Ì§Aªº³]©w¥\¯à¬O¤Á´«¨ì·L³nª`µ.
©ÎªÌ«öµÛ Ctrl Áä»P Shift Á䤣©ñ,
¦A«ö¤@¤U 1 «öÁä,(¼Æ¦rÁä«Øij³£¨Ï¥ÎÁä½L¥kÃä¼Æ¦rÁä°Ï¤¤ªº«öÁä, ¥ªÃ䪺¼Æ¦rÁ䦳®É·|¦³¤£¦Pªº·N¸q)
±µµÛ©ñ±¼©Ò¦³«öÁä,
¬Ý¿é¤Jªk¬O§_¦³¤Á´«¨ì·L³nª`µ,
Y¨S¤ÏÀ³¥i¯à¬O¨t²Î³]©w»Ýn¦A°µ½Õ¾ã.
¬Ý¹Ï»¡¬G¨Æ,
¨Ì§AÂ^¨úªºµe±§Ú²q´ú,
§A¥i¥H¸Õ¸Õ¦b«á±¨ºÓ ¶i¶¥³]©wµe± ¤¤,
¤Á´«¿é¤Jªk ¶µ¤U,
Åý§Ú¬°¨CÓÀ³¥Îµ{¦¡µøµ¡...
±N¨ºÓ¥´¤Ä ¨Ã®M¥Î«á¬Ý¬Ý¬O§_¯à¥¿±`¤Á´«.
'³oÓ¨S¤ÏÀ³
SendKeys "%+", True
³oÓ¨S¤ÏÀ³¬O¥¿±`ªº,
%+ ¬O¦P®É«ö¤U Alt »P Shift «öÁä,
¨S¦³·f°t¦P®É«ö¤U¨ä¥L«öÁ䤣À³¸Ó¦³¤ÏÀ³.
¦^´_ luhpro
¸É¥R»¡©ú¡G
#4 ¤º 3 ¬qµ{¦¡³£·|¨Ï ¼Æ¦rÁä½Lªº NumLock ¨Ó¦^ªº Âê©w»PÄÀ©ñ
Scott090 µoªí©ó 2015-4-9 14:29
³o¸Ì¬Ý¤£¨ì§A©I¥s KeyBoard ¨º¨Ç°Æµ{¦¡ªº¤è¦¡,
¦pªG©I¥s«e«á¦³°j°é¨º»ò¦³¥i¯à°õ¦æ¼Æ¦¸ KeyBoard °Æµ{¦¡(«öÁä¦n´X¦¸¤F),
³o¤@ÂI¤]¬O»Ýn½T»{ªº.
¥t¥~³o¤@¦æ:
Application.Wait Now + TimeValue("00:00:02")
¥i¥H³q³q¥Î ' §â¥¦ Mark ±¼,
¦]¬° SendKeys «á±©ñ True,
¤w¸g·|µ¥¨ì¿é¤Jª¬ºA¤Á´«§¹²¦¤~·|Ä~Äò°õ¦æ¤U¥h,
¤£»Ýn¦A°õ¦æµ¥«Ý§@·~.
©ÎªÌ§A¤]¥i¥H¦b §Y®É¹Bºâµøµ¡ ¤¤¿é¤J:
SendKeys "^ ", True
©Î
SendKeys "^+1", True
«á«ö¤U Enter «öÁ䪽±µ°õ¦æ.
¬Ý¿é¤J¼Ò¦¡¬O§_¦³¥¿½T¤Á´«¹L¥h,
Y³o¸Ì¤£¯à¥¿½T¤Á´«,
¨º©ñ¶i VBA µ{¦¡½X¤¤¤]¤£·|¥¿½T¤Á´«. |
|
|
|
|
|
|
- ©«¤l
- 519
- ¥DÃD
- 54
- ºëµØ
- 0
- ¿n¤À
- 595
- ÂI¦W
- 259
- §@·~¨t²Î
- win 10
- ³nÅ骩¥»
- []
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-3-19
- ³Ì«áµn¿ý
- 2024-11-27
|
¦^´_ 6# luhpro
¨Ì·Ó«ü¾É¡G
1.¤Ä¿ï "... ¬°¨CÓÀ³¥Îµ{¦¡µøµ¡³]©w .... "¡A ¸ÕÅçµ²ªG¬O¨S¦³À°§Uªº
2.¨Ï¥Î§Y®É¹Bºâµøµ¡©M ³v¨B°õ¦æ(¤â«ö Enter³v±ø°õ¦æ)¤ù¬qµ{¦¡ªºµ²ªG¬O¤@¼Ëªº¡F
3.ÁöµM Sendkeys ¦³ waitªº°Ñ¼Æ¡A ÁÙ¬OµLªk½T«O¨ä¥¿½T°õ¦æ¡F
4.§Úªº¹q¸£¬O OS Win8.1 ·L³nª`µ¡A¸g¤ÀªR«á¨äª¬ºA»P¿é¤JÁ䪺Ãö«Y¦p¹Ï
5.¨Ì·Ó¤ÀªRªí§@¤U¦Cµ{¦¡½X- '¨ÏÁä½L¦¨¬° "^¤å" ¿é¤Jª¬ºA
- Sub ChangeIMEToE()
- If IMEStatus = 1 Then
- SendKeys "+", True
- End If
- End Sub
- '¨ÏÁä½L¦¨¬° "·L³nª`µ"¿é¤Jª¬ºA
- Sub ChangeIMEToC()
- ' Call ActiveIMEKeyBoard("·L³nª`µ")
- ' Debug.Print "0,"; IMEStatus
- '°²¦pª¬ºA¬O C¡A send a "Shift" key
- If IMEStatus = 2 Then SendKeys "+", True ': Sleep 1500
- DoEvents
- ' Debug.Print "1,"; IMEStatus
-
- ''°²¦pª¬ºA¬O B¡A send a "Ctrl Space" keys
- If IMEStatus = 2 Then SendKeys "^ ", True
- DoEvents
- ' Debug.Print "2,"; IMEStatus
-
- '°²¦p¤W¤@Ó Bª¬ºA¤§°_©lª¬ºA¬O C¡A³o®É±oª¬ºA C¡A send a "+" key
- If IMEStatus = 2 Then SendKeys "+", True ': Sleep 500
- DoEvents
- ' Debug.Print "3,"; IMEStatus, vbLf
- End Sub
½Æ»s¥N½X ¸ÕÅ窺µ²ªG¡G ¥i¥Î
1.Sendkeys ,True ¤£¦¨¥\
2.¥[ Application.wait ... ¤£¦¨¥\
3. ©I¥s API sleep ... ¤£¦¨¥\
4. ¥Î DoEvents OK
¥H¤W¬O¹êÅ窺µ²ªG¡A½Ð«ü±Ð
¤]³\´M§ä Win8.1 API ¥i¯à·|¦³§óª½±µªx¥Îªºµª®× |
|
|
|
|
|
|