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

[­ì³Ð] vba±M®×¤£¥i¨£-oldvba¤èªk»POLDVBALOOK¼W¯q¶°

[­ì³Ð] vba±M®×¤£¥i¨£-oldvba¤èªk»POLDVBALOOK¼W¯q¶°

¥»©«³Ì«á¥Ñ HUNGCHILIN ©ó 2012-9-19 23:53 ½s¿è

vba±M®×¤£¥i¨£ªº¤è¦¡»P­ì²z
­ì²z: §Q¥ÎEXCEL95ª©¨S¦³ IsAddin¥\¯àªºBUG¡A§Ú­Ì¨Ï¥ÎEXCEL97¥H¤Wª©¥»±N¦³¥¨¶°ªºÀÉ®×°µ IsAddin=True¡AµM«á¦A¦s¦¨EXCEL5.0/95®æ¦¡¡A¥H¦¹°µªk¥i°µ¦¨[vba±M®×¤£¥i¨£]¡Aªü¦N2000~2008¦~¶¡¥H¦¹­ì²z»Pµ{¦¡¨¬¥H »P ¶W»ÅVBA¤uµ{¥[锁¸Ñ锁¾¹[ldhyobª©] ¥­¤À¬î¦â¡A¦ý¦¹­ì²zºô¤W¤Ö¦³¥B¤£´¶¹M¡A¹ï³\¦h°ª¤â¨Ó»¡¡A¬O¨ä·d¤£²M·¡¥B¯«¯µªº°µªk¡A²{¦b±N¼W¯q¶°¤u¨ãµ{¦¡¤½¶}

¾A¥Î³nÅé:Excel2003ª©¥H¤U

¯S¦â: ¤@¯ëªº³nÅé »P ¶W»ÅVBA¤uµ{¥[锁¸Ñ锁¾¹[ldhyobª©] ¯}¸Ñ¤£¶}

³o­Ó¤u¨ã¬O ¶W»ÅVBA¤uµ{¥[锁¸Ñ锁¾¹[ldhyobª©] µo®i«e¡Aªü¦N¤â¤¤¥Î¨Ó»s§@ [vba±M®×¤£¥i¨£] ªº¼W¯q¶°¤u¨ã¡A¬O¦hºØ[vba±M®×¤£¥i¨£]¤èªk¨ä¤¤¤@ºØ
´N§Ú©Òª¾´N³æ¯Â¥u¬O­ì²z¤£¬O¤u¨ã.¦Ü¤Ö´N¦³¦hºØ­ì²z¡A³o¬O¨ä¤@[Âà¶K] vba±M®×¤£¥i¨£ ¦Ü¤Ö¦³4ºØ­ì²z

OLDVBALOOK.rar (7.58 KB)

p.s.ÀHµÛ¬ì§Þªº¶i¨B excel5.0/95 ¦b Excel2010µLªk¨Ï¥Î¦¹¤u¨ã¤]¦¨¬°ªü¦Nªñ´Á±Ë±óªº¤@¶µ§Þ³N
¤£¹L¦pªG±z§Y±NÂ÷¶}³æ¦ì©Î¤½¥q.¨Ï¥Î¦¹¤u¨ã¨Ó«OÅ@VBA ¬O­Ó¤£¿ùªº¿ï¾Ü.¦]¬°¥u­n¤½¥q´«Excel2010ª©¥H¤Wª©¥»¡A¨Ï¥Î¦¹­ì²z«OÅ@¹LªºÀÉ®×´N¤£¯à¥Î¤F

ªü¦N¥S:
    ³o´X¤Ñ§Ú±M¤ß¬Ý¥»½g¤Î¬ÛÃö½g¤º®e¡A²×©óÀ´¤F¡A¹ê¦bÁÂÁ±z«ü¾É¡C§Ú¤]«ä¦Ò¤@¤U¡A¬°¦ó·|¦³¦p¦¹±¡§Î¡A§Ú·Q¥D­n¬O§Ú»~¸Ñ¤F¡uÂê©w¡v¤Î¡u¸Ñ°£VBA ±M®×Âê©w¡vªº¤À¬ÉÂI©Ò­P¡F¨Ì§Ú¥DÆ[·Qªk¥»½g½g¦W¬J¬°¡uvba±M®×¤£¥i¨£-oldvba¤èªk»POLDVBALOOK¼W¯q¶°¡v¡A¨º§¹¦¨Âê©wÀ³¸Ó¬°¤U¦C6¶µ§¹¦¨¤è¥i
1¡A±N¦³VBA ¥¨¶°ªºExcel ÀÉ¥t¦s¦¨95/5¡A0
2¡A±NÀÉ®×isaddin=true
3¡AÃö³¬ÀɮסA会¥X²{¬O§_¦sÀÉ¡A«ö¦sÀÉ¡A´N§¹¦¨
4¡A±N¤W­±»s§@ªºÀÉ¥´¶}
5¡A¶}·sExcel ÀÉ¡A¦b¼Ò²Õ¤º¶K¤J#12©«ªºµ{¦¡¡]¦¹µ{¦¡内¡AÀɮצWºÙ°O±o­n§ï¡^¡A°õ¦æµ{¦¡¡A±N¦¹Àɪºisaddin=False
6¡A¥t¦sÀɮצ¨97/2003®æ¦¡
    ¤£¹L¬Ý¤F±z³Ìªñ¦^´_¡A¤è¤F¸Ñ±zªº«äºû¡A¼W¥[±z«Ü¦h³Â·Ð¡A¦A¤@¦¸¦V±z­Pºp¡C
    ¹ï©ó±z©Òµoªí¦U±MÃD¡A¬O¦³¬Û·í¤º®e¡A§Ú»{¬°±z¥ú¬O¥Ø«eµoªí±MÃD¡A¬O¨¬¥H½s¿è¥X®Ñ¡A©Ò¿×¥ß¥\¡B¥ß¼w¡B¥ß¨¥¿×¤§¤T¤£¦´¡A¬J¬O¦³¦¹¯à¤O¡A´N­n¦³¦p¦¹¾á·í¡F©¡®É¥i¸¹¥lºô¤ÍÃÙ§U§@«~¡A¦p»X¤£±ó§ÚÄ@ºÉ´ÖÁ¡¤§¤O¡C
1

µû¤À¤H¼Æ

Lin

TOP

¥»©«³Ì«á¥Ñ HUNGCHILIN ©ó 2013-2-8 01:47 ½s¿è

©êºp¡A­«¨Ó¤@¦¸¡A§Ú­Ì¤£­n¥Î¥ô¦ó¤u¨ã¡A¯Â¤â¤u¨ÓÂê©w»P¸Ñ°£VBA±M®×¤£¥iÀ˵ø
Âê©w
1¡A±N¦³VBA ¥¨¶°ªºExcel ÀÉ¥t¦s¦¨95/5¡A0
2¡A±NÀÉ®×isaddin=true
3¡AÃö³¬ÀɮסA会¥X²{¬O§_¦sÀÉ¡A«ö¦sÀÉ¡A´N§¹¦¨

¸Ñ°£VBA ±M®×Âê©w
1¡A±N¤W­±»s§@ªºÀÉ¥´¶}
2¡A¶}·sExcel ÀÉ¡A¦b¼Ò²Õ¤º¶K¤J#12©«ªºµ{¦¡¡]¦¹µ{¦¡内¡AÀɮצWºÙ°O±o­n§ï¡^¡A°õ¦æµ{¦¡¡A±N¦¹Àɪºisaddin=False
3¡A¥t¦sÀɮצ¨97/2003®æ¦¡
4¡A«OÅ@¦@¥Î¬¡­¶Ã¯¡A¨Ã³]©w±K½X
5¡A¸Ñ°£«OÅ@¦@¥Î¬¡­¶Ã¯¡A´N§¹¦¨¸Ñ°£

TOP

ªü¦N¥S:
±z©Ò´£10©«ªº¤èªk 1 ¡§¦A¥Î[vba¥[Âê¸ÑÂê¾¹]¸Ñ°£vba±M®×¤£¥iÀ˵øÂê¾¹]¡¨¡A§Ú¦³¸Õ°µ¦h¤é¡A¦ý¤´¤£±o¨ä¸Ñ¡F¬Q¤é¬Ý¨ì±zªº¶K¤å«á¡A·Q·Q¥i¯à¬O¦WÃã»~¸Ñ¡A§Ú¬d¡u[¤À¨É] ¦p¦ó¦b¨S¦³¥ô¦ó¤u¨ã¤U·s¼W»P¸Ñ°£VBA¤w³QÂê©w_±M®×µLªkÀ˵ø(¦@¥Î¬¡­¶Ã¯)¡v²Ä6©«1."VBA±M®×¥[¸ÑÂê¾¹" ¦p:http://forum.twbts.com/viewthread.php?tid=70&extra=¡A¤U¸ü¨Ã¨Ï¥Î¡uVBA±M®×²©ö¥[¸ÑÂê¾¹¡vµL®Ä¡A¤èÅצh¦¸¸ß°Ý¡A½Ð½Ì¸Ñ¡C
¤µ¤Ñ§Ú¨Ì¡uvba±M®×¤£¥i¨£ ¦Ü¤Ö¦³4ºØ­ì²z¡v¤¤²Ä1©«¡u¤G¶i¦ì¬¡­¶Ã¯ ¶W»ÅVBA¤uµ{¥[Âê¸ÑÂê¾¹[ldhyobª©]http://www.officefans.net/cdb/vi ... d=15681&fpage=1¡v¡A¯àµù¥U¦ý¤£¯à¤U¸üªþ¥ó¡F«á¨Ó¦b¨ä¥Lºô¯¸¤U¸ü¡uVBA¤uµ{¥[¸Ñ锁¾¹(§¹¥þª©).xls¡v²Å骩¡A¦ý¤´µLªk¨Ï¥Î¡A¤£¹L§ÚÁÙ¬O·|¥t¥~·Q¿ìªk¡C
§Ú·Q¨C­Ó¤H¥i¯à¨ü­­©óµ{«×®t²§¡A©Ò¥H¤£¨£±o³£¬O¤£»{¯u¦ý¤S·R¶Ãµo°Ý¡A¤×¨ä¬O§Ú¦~»´®É¤]¦b°ª¤¤±Ð¹L®Ñ¡A§Ú¤£·|¤£À´³o­Ó¹D²z¡C·íµM¤£½×¥ô¦ó¤H´£¥XºÃ°Ý±z³£¦³µª©Î¤£µªªºÅv¯q¡A¦ý§Ú¥u¬O¤£§Æ±æ»~¸Ñ¡C
Lin

TOP

¥»©«³Ì«á¥Ñ HUNGCHILIN ©ó 2013-2-6 13:42 ½s¿è

¦^´_ 17# lin

§Ú¥i¥H½T©w±z¨S¦³±M¤ß¬Ý²Ä#8¡B#10©«¡AVBAÂê©w¤]¨S¯}¸Ñ¶}¨Ó¡A¤~¤@ª½­«½Æ°Ý¦P¼Ëªº°ÝÃD
§Ú·Q½Ð±z¥ý¥Î#10©«ªº¤èªk 1 ©Î¤èªk2 ¥ý°µ¤@¦¸¡A«e­±¨º´X©«±z³£¥u°µ¤@¥b¡A®Ú¥»¨S·Ó #10ªk1ªk2 °µ

±z¦s¦¨97-2003®æ¦¡«á.¦³¦A¥Î VBA±M®×¥[Âê¸ÑÂê¾¹ ¦A°µ¤@¦¸¸ÑÂê¶Ü?(ªk1)¡A©ÎªÌ °µÂê©w¦@¥Î¬¡­¶Ã¯¡A¦A¸Ñ°£Âê©w¦@¥Î¬¡­¶Ã¯(ªk2)
±z«á¥b¬q¨BÆJ³£¨S°µ¯à¯}¸Ñ?ªP¶O§Ú#10©«¥´¨º»ò¦h¦r¡A³£¨S¦b¬Ý

·Ó¤W­z°µ±z¨ì©³¥d¦b­þÃä?
*¨S°µLWorkbooks("BOOK1.xls").IsAddin = False?
*¨S¥t¦sÀɮ׬° 97-2003®æ¦¡ OR XLSM?
*¨S¦A¥Î VBA±M®×¥[Âê¸ÑÂê¾¹ ¦A°µ¤@¦¸¸ÑÂê¶Ü?(ªk1)¡A©ÎªÌ °µÂê©w¦@¥Î¬¡­¶Ã¯¡A¦A¸Ñ°£Âê©w¦@¥Î¬¡­¶Ã¯(ªk2)?

#13~#17³£¬O­l¦ù¥X¨Óªº¨S¦³¥Îªº©«

TOP

ªü¦N¥S:
      °õ¦æ¡uvba±M®×¤£¥i¨£-oldvba¤èªk»POLDVBALOOK¼W¯q¶°¡v¡A¶}±ÒÀɮקó§ïÄÝ©Ê«á¦A¥t¦s¦¨³Ì·sÀɮסA§Ú¸ÕµÛ¦boffice 2007©Îoffice 20035¤¤Âà¦^­ìÀÉ®×¥H«K§ó§ï¥¨¶°¦ý¡A¤´µLªk¿ì²z:
Lin

TOP

¦^´_ 15# lin


    ¸ÑÂê«á¬O¥i¿ý¨î»P¼W¥[¥¨¶°¡A±z¦³·Ó¤W­±§¹¦¨¯}¸Ñ¡A¸Õ¸Õ´Nª¾¹D

TOP

ªü¦N¥S:
        ¥i¯à§Úªºªí¹F¦³»~¡A§Ú¬O·Q°Ý°õ¦æ¡uvba±M®×¤£¥i¨£-oldvba¤èªk»POLDVBALOOK¼W¯q¶°¡v¡A¶}±ÒÀɮקó§ïÄÝ©Ê«á¦A¥t¦s¦¨³Ì·sÀɮסA¬O§_¥i¥H¸ÑÂê²K¥[¥¨¶°¡C
Lin

TOP

¦^´_ 13# lin


    ªü¦N¥S:
        ©Ó»X«ü¾É¡A¸U¤À·PÁ¡A°õ¦æ¡uvba±M®×¤£¥i¨£-oldvba¤èªk»POLDVBALOOK¼W¯q¶°¡v¡A¶}±ÒÀɮקó§ïÄÝ©Ê«á¦A¥t¦s¦¨³Ì·sÀɮסA²£¥ÍºÃ°Ý¦³¤T¡G

ANS:
1.³o¬Ovba±M®×¤£¥i¨£ªº¤èªk¤§¤@.­«¶}±Ò«á·íµM¤£¯à¨£¥»ÀÉ®×¥¨¶°¡A¤]·íµM¤£¯à¤£¯à²K¥[¥¨¶°¡C­n¤£°µ³o¥\¯à°µ¬Æ»ò
2.³o¬O¨Ï¥ÎEXCEL5.0ªº§@ªk¡A·sªº¥\¯à¦puserform·íµMµLªk¨Ï¥Î
3.³o­Ó§Ú¨ä¥L¶K¦³»¡¹L¤F¡A°ßŪÀɮץΦ¹¤èªk©ÎVBA¥[Âê¸ÑÂê¾¹³£¤£¯àª½±µ°µvba±M®×¤£¥i¨£Âê©w»P¯}¸Ñ¡A°£«D¥ý¸Ñ°£°ßŪ¦b°µ

TOP

ªü¦N¥S:
       ©Ó»X«ü¾É¡A¸U¤À·PÁ¡A°õ¦æ¡uvba±M®×¤£¥i¨£-oldvba¤èªk»POLDVBALOOK¼W¯q¶°¡v¡A¶}±ÒÀɮקó§ïÄÝ©Ê«á¦A¥t¦s¦¨³Ì·sÀɮסA²£¥ÍºÃ°Ý¦³¤T¡G
1.­«¶}±Ò«á¤£¯à¨£¥»ÀÉ®×¥¨¶°¡A¤]¤£¯à²K¥[¥¨¶°¡C
2.Active±±¨î¶µ¡B¥\¯àªí©R¥O¹Ï¥Ü¡Buserform¤ÎExcel4.0µLªkÂà´«¡C
3.°ßŪÀɮסBVBCProject¥[±K«á¤]µLªkÂà´«¡C
Lin

TOP

        ÀR«ä¦Û¦b : ¡i®É¤é²öªÅ¹L¡j¤@­Ó¤H¦b¥@¶¡°µ¤F¦h¤Ö¨Æ¡A´Nµ¥©ó¹Ø©R¦³¦hªø¡C¦]¦¹¥²¶·»P®É¶¡Ävª§¡A¤Á²ö¨Ï®É¤éªÅ¹L¡C
ªð¦^¦Cªí ¤W¤@¥DÃD