ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦p¦ó¦bÀx¦s®æ¤º¤UCtrl+Shift+Enter«ü¥O(oobird ¤w¸Ñµª)

[µo°Ý] ¦p¦ó¦bÀx¦s®æ¤º¤UCtrl+Shift+Enter«ü¥O(oobird ¤w¸Ñµª)

¥»©«³Ì«á¥Ñ av8d ©ó 2012-2-21 08:57 ½s¿è
  1. Sub aa()
  2.     Range("B1").Select
  3.     Range("B1") = "{=IF(SUM(--ISNUMBER(FIND(A$1,¦a§}!C$1:C$100)))<ROW(),"""",INDEX(¦a§}!C:C,SMALL(IF(ISNUMBER(FIND(A$1,¦a§}!$C$1:$C$100)),ROW($A$1:$B$100)),ROW())))}"

  4. End Sub
½Æ»s¥N½X
§Ú·Q©R¥OB1=IF(SUM(--ISNUMBER(FIND(A$1,¦a§}!C$1:C$100)))<ROW(),"""",INDEX(¦a§}!C:C,SMALL(IF(ISNUMBER(FIND(A$1,¦a§}!$C$1:$C$100)),ROW($A$1:$B$100)),ROW())))
¦ý¬O¥²¶·¦b¥ª¥k¦U+{}
¦p¤U
Range("B1") = "{=IF(SUM(--ISNUMBER(FIND(A$1,¦a§}!C$1:C$100)))<ROW(),"""",INDEX(¦a§}!C:C,SMALL(IF(ISNUMBER(FIND(A$1,¦a§}!$C$1:$C$100)),ROW($A$1:$B$100)),ROW())))}"
¦ý¬O°õ¦æ«á{}«o¤£·|¥X¨Ó

¦^´_ 1# av8d
  1. Sub aa()
  2.     Range("B1").Select
  3.     Range("B1") = "=SUM(A1:A10)"
  4.     Application.SendKeys "{F2}"
  5.     Application.SendKeys "^+~"
  6. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE


    ª©¥D±z¦n¡A±z¨¯­W¤F¡A¦ý¬O¥¦¥X²{¤@­Ó¿ù»~°T®§¡A§ÚÂI¤F¤@¤U»¡©ú
¥²¶·«ü©w·j¯Á¦r¦ê

·í¦bª«¥óÂsÄý¾¹¤¤·j¯Á®É¡A¥²¶·¿é¤J¦r¦ê¡C¸Ó¿ù»~¦³¥H¤U­ì¦]©M¸Ñ¨M¤è®×¡G
¦b Object Browser ¤¤¶}©l¤F¤@­Ó¯Á¡A¦ý¨S¦³«ü©w­n¯Áªº¤å¦r¡C
¿é¤J¯Á¦r¦ê¡C
Ãö©ó¨ä¥¦¸ê°T¡A½Ð¿ï¤¤¦³°ÝÃDªº±ø¥Ø¨Ã«ö F1 Áä (¦b Windows¤¤) ©Î HELP (¹ï©ó Macintosh)¡C

TOP

¦^´_ 3# av8d
°õ¦æApplication.SendKeys    ¥²¶·¥Î¹Ï¤ù ©Î«ö¶s «ü©w ¥¨¶° ¨Ó°õ¦æ, ©Î ¦p¹Ï



TOP

¦^´_ 4# GBKEE


    ª©¥D±z¦n~¦]¬°¬O¼g¦bWorkbook¸Ì­±~

Private Sub Workbook_Open()

End Su

TOP

¦^´_ 5# av8d
¦]¬°¬O¼g¦bWorkbook¸Ì­±
¦³¦ó°ÝÃD§A¨S»¡°Ú!!

TOP

¦^´_ 6# GBKEE


    ¤j¤j¨¯­W¤F~

¦bSheet¸Ì­±¨Ï¥Îªº¸Ü~¬O§_­n¼gªº¾É¦V¥¨¶°¡C

¦pªG¥¨¶°¬O
Sub aa

End Sub

¦bSheet¸Ì­±¨Ï¥Îªº¸Ü¡A¬O¤£¬O¦³­Ó show aa¡C

TOP

¦^´_ 7# av8d
µ{¦¡¦p¬O¦b  ª«¥ó¼Ò²Õ¤¤ ¬°¤½¥Îµ{¦¡   ( ¦³¨S¦³¥[¤W "Public"³£¬O¤½¥Îµ{¦¡ )  : »Ý«ü©úª«¥ó¼Ò²Õªº¦WºÙ                                          
¦p Sub EX()
       Sheet1.Test
       Sheets("Sheet1").Test
       ThisWorkbook.Test
End Sub
µ{¦¡¦p¬O¦b  ¤@¯ë¼Ò²Õ(Module)¤¤  ¬°¤½¥Îµ{¦¡   ( ¦³¨S¦³¥[¤W "Public" )  :  ª½±µ©I¥s§Y¥i
SUB Ex()
  Test
End Sub
µ{¦¡¦p ¬°¨p¥Îµ{¦¡   ( ¦³¥[¤W "Privatec" )  : ¬Ò»Ý¬°
Sub Ex()
        Run   " Sheet1.Test"
        Run   "Sheets("Sheet1").Test "
        Run   "ThisWorkbook.Test "
       Run   "Module1..Test "
End Sub

TOP

¦^´_ 8# GBKEE


Private Sub Workbook_Open()

End Sub

©Ò¥H¦bWorkbook°õ¦æSendKeys¦]¬°¥¦¬OPrivate(¨p¦³)©Ò¥HµLªk°õ¦æ¥²¶·©I³êª«¥ó¼Ò²Õ©Î¤@¯ë¼Ò²Õ¤~¯à°õ¦æ¡AÁÙ¬O»¡¦³¥t¥~ªº°õ¦æ¤èªk?
¦pªG¬O¦bª«¥ó¼Ò²Õ¸Ó¦p¦ó°õ¦æ?

TOP

¦^´_ 9# av8d
¨p¥ÎPrivate ªºµ{¦¡ «D¦Û¤vªº¼Ò²Õµ{¦¡¸Ì ¤¤¬Ò»Ý¥Î   Run "ThisWorkbook.Workbook_Open"
¥»¨­ªº¼Ò²Õ ¤¤ª½±µ©I¥s ³o Private ªºµ{¦¡§Y¥i  Workbook_Open

TOP

        ÀR«ä¦Û¦b : ¤Ñ¤W³Ì¬ü¬O¬P¬P¡A¤H¥Í³Ì¬ü¬O·Å±¡¡C
ªð¦^¦Cªí ¤W¤@¥DÃD