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

[µo°Ý] ¤@¶}±ÒexcelÀÉ´N¦Û°Ê¶]ªºvb(¤w¸Ñ¨M¡A·P®¦)

[µo°Ý] ¤@¶}±ÒexcelÀÉ´N¦Û°Ê¶]ªºvb(¤w¸Ñ¨M¡A·P®¦)

¥»©«³Ì«á¥Ñ pitera88 ©ó 2012-1-4 23:02 ½s¿è

·s¤â¨Óµo°Ý¡A½Ð¦U¦ì¤j¤jÀ°¦£¡A·P®¦

§Ú¬O·Q§â³o­ÓexcelÀÉÂê©w¦b³o¥x¹q¸£¨Ï¥Î¡A

½Ð°Ý­n¤@¶}ÀÉ´N·|¦Û°Ê°õ¦æ(¶}Àɮɶ]´N¦n¡A¤£­n¸ê®Æ¦³Åܧó´N­pºâ¤@¦¸ªº)ªºµ{§Ç­n«ç»ò¼g???

¨Ò¦p¡G¤@¶}ÀÉ ¥X²{¡uÅwªï¨Ï¥Î¥»¥\¯à¡v°T®§¡A¦Ó«áµ²§ô³oµ{§Ç´N¤£¦A¶]¤F

³Â·Ð¤j¤j­Ì¤F
¤¯¥S

¦^´_ 1# pitera88
ThisWorkbook ¼Ò²Õ
  1. Private Sub WORKBOOK_OPEN()
  2.   MsgBox "Åwªï¨Ï¥Î¥»¥\¯à"
  3. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ pitera88 ©ó 2012-1-4 10:26 ½s¿è

¦^´_ 2# register313


    ÁÂÁ¤j¤jªºÀ°¦£¡A·P®¦

Private Sub WORKBOOK_OPEN()
¤¤¶¡¬O§_¥i¥H¥[¤J¡AÀË´ú¹q¸£¤¤¬O§_¦³¡uc:\123¡v¸ê®Æ§¨
¦³ªº¸Ü ¡õ
  MsgBox "Åwªï¨Ï¥Î¥»¥\¯à"

¦pªG¨S¦³ ¡õ
   µ²§ô³o­ÓexcelÀÉ (¸õ¹L¬O§_¦sÀÉ¡Aª½±µ¸õ¶})
End Sub

¦A³Â·Ð¤j¤j¤F
¤¯¥S

TOP

¦^´_ 3# pitera88

·íµM¥i¥H¡A´N¸ò¤@¯ëSUB¤@¼Ë¡A§â·Q­n°õ¦æªºµ{¦¡½X¼g¶i¥h´N¦n¤F

TOP

¥»©«³Ì«á¥Ñ pitera88 ©ó 2012-1-4 13:17 ½s¿è

±q§O¤Hªº¤å³¹¤¤¸`¿ý¤U¨Óªº¡A¦A§@¤@ÂI­×§ï¡A½Ð¤j¤j­ÌÀ°­×¤@¤U

Const ThePath = "C:\123\"
Private Sub WORKBOOK_OPEN()
    ¤¤¶¡¬O§_¥i¥H¥[¤J¡AÀË´ú¹q¸£¤¤¬O§_¦³¡uc:\123¡v¸ê®Æ§¨
SavePath = Dir(ThePath, 16)
If SavePath = "" Then
     ¦³ªº¸Ü ¡õ
  MsgBox "Åwªï¨Ï¥Î¥»¥\¯à"

¦pªG¨S¦³ ¡õ
else
   µ²§ô³o­ÓexcelÀÉ (¸õ¹L¬O§_¦sÀÉ¡Aª½±µ¸õ¶})
   Newbook.Close True, SavePath ¡÷³o¬q¬O¤°»ò·N«ä
End Sub
¤¯¥S

TOP

¦]¬°­è±µÄ²¡A©Ò¥Hµ{¦¡½XÁ٫ܦh¤£ª¾¹Dªº
¥¿§V¤Oª¦¤å¤F
¤¯¥S

TOP

¦^´_ 5# pitera88
SavePath = Dir(ThePath, 16)
If SavePath = "" Then       ->³o¬O¨S¦³³o¸ê®Æ§¨
  MsgBox "Åwªï¨Ï¥Î¥»¥\¯à"
else     ->¦³³o¸ê®Æ§¨
      Newbook.Close True, SavePath ¡÷³o¬q¬O¤°»ò·N«ä
    µ²§ô³o­ÓexcelÀÉ   True=¦sÀÉ¡A¦sÀɪº§¹¾ã¸ô®|¦WºÙ->SavePath
End If
End Sub

TOP

¥»©«³Ì«á¥Ñ pitera88 ©ó 2012-1-4 16:34 ½s¿è

¦^´_ 7# GBKEE


    Const ThePath = "C:\123\"
Private Sub WORKBOOK_OPEN()
    ¤¤¶¡¬O§_¥i¥H¥[¤J¡AÀË´ú¹q¸£¤¤¬O§_¦³¡uc:\123¡v¸ê®Æ§¨
SavePath = Dir(ThePath, 16)
If SavePath = "" Then   ->³o¬O¨S¦³¸ê®Æ§¨ªº¸Ü¡A¶¶§Ç´N­n§ï¤F
     ¦pªG¨S¦³ ¡õ µ²§ô³o­ÓexcelÀÉ (¸õ¹L¬O§_¦sÀÉ¡Aª½±µ¸õ¶})
   Newbook.Close True, SavePath ¡÷¤]´N¬Osavepath ¬O­ÓÅܼơA§Ú¤§«e´N­n³]©wÅo¡A¥i¬O§Ú¤§«e¥Î¤F¡A¨º¥i¥H«ü©w¤@­ÓÅܼƮ»¨ì¥Ø«e¶}±Òªº³o­ÓÀɮתº§¹¾ã¸ô®|¶Ü??) ÁÙ¬O¥i¥H¤£µ¹³o­Ó°Ñ¼Æ?
                          
else
¦³ªº¸Ü ¡õ
  MsgBox "Åwªï¨Ï¥Î¥»¥\¯à"
End Sub


¤U¥h¶]¡Aµ²ªG¡u°õ¦æ¶¥¬q¿ù»~ 424 ¡v ¦¹³B»Ý­nª«¥ó  ¨þ¨þ!!
¤¯¥S

TOP

¦^´_ 8# pitera88
If SavePath = "" Then MkDir (ThePath)                       '¸ê®Æ§¨¤£¦s¦b «Ø¥ß¥¦

¨º¥i¥H«ü©w¤@­ÓÅܼƮ»¨ì¥Ø«e¶}±Òªº³o­ÓÀɮתº§¹¾ã¸ô®|¶Ü??) ÁÙ¬O¥i¥H¤£µ¹³o­Ó°Ñ¼Æ? (Newbook ¤w¸g¦sÀɹLªºÀÉ®× )
Newbook.Path :           Àɮצs©ñªº¸ê®Æ§¨
Newbook.FullName : §¹¾ãªº¸ê®Æ§¨¸ô®|ÀɮצWºÙ

TOP

¦^´_ 9# GBKEE


  Const ThePath = "C:\123\"   '->³o¤@¦æ©ñ¦b³o¹ï¶Ü?©Mµ{§Ç¦n¹³¤¤¶¡¹º¤@±ø½u
Private Sub WORKBOOK_OPEN()
  SavePath = Dir(ThePath, 16)
If SavePath = "" Then  '§Ú¬O­nÀˬd¥Î¡A³oÀɮפ£­n¨ì§Oªº¹q¸£¥i¥H¥´¶}
     
   Newbook.Close True   '½Ðgrkee¤j¤jÀ°§Ú¼g¤@¤U¡A¥u­n±j¨îÃö³¬³oÀÉ®×´N¦æ¡A·P®¦
   
Else
  MsgBox "Åwªï¨Ï¥Î¥»¥\¯à"
End If
End Sub
¤¯¥S

TOP

        ÀR«ä¦Û¦b : §g¤l¥ß«í§Ó¡A¤p¤H«í¥ß§Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD