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

[µo°Ý] ¦³¿ìªk¦@¥ÎVBA¥¨¶°¼Ò²Õ¶Ü?

[µo°Ý] ¦³¿ìªk¦@¥ÎVBA¥¨¶°¼Ò²Õ¶Ü?

°²³]§Ú²{¦b¦³¦h­ÓÀɮסA§ÚªºÀɮתºµ{¦¡½X³£¬O¤@¼Ëªº¡A¨ºVBAªº¼Ò²Õ¦³¿ìªk«Ê¸Ë©Î¬O¦@¥Î¶Ü?
³o¼Ë¦pªGµ{¦¡½X­n­×§ï©Î¬OºûÅ@´N¤£¥Î¤@­Ó¤@­Ó§ï¤F¡C

¥»©«³Ì«á¥Ñ n7822123 ©ó 2019-6-19 01:38 ½s¿è

¦^´_ 1# s13030029


¤èªk¤@:  §â§Aªº¥¨¶°¼g¦b ­Ó¤H¥¨¶°¬¡­¶Ã¯ ¡A¥u­n­×§ï¸Ì­±ªº¥¨¶°§Y¥iÅý¦U­Óexcel³£¥i¨Ï¥Î

¤èªk¤G: §â§Aªº¥¨¶°¶×¥X¨ì©T©w¦ì¸mªº¸ê®Æ§¨¤º¡A¥¼¨Ó¥u­nºûÅ@¸Ó¸ê®Æ§¨¤ºªº¥¨¶°ÀÉ®×(.bas)§Y¥i
              ¦b§A­n°õ¦æ¥¨¶°ªºÀÉ®×¼g¤J¥H¤U¥¨¶°¡A¦¹¥¨¶°¥i¥HÅý¬¡­¶Ã¯¥´¶}ªº®É­Ô¡A·|¦Û°Ê¶×¤J«ü©wªº¥¨¶°ÀÉ (.bas)
              ª`·N¡A­n¼g¦bThisWorkbook ¸Ì­±¡A ¸ô®|ÀɦWªº³¡¤À½Ð¦Û¤v³]©w

¦Û°Ê¶×¤JBASÀɪº¥¨¶°¦p¤U¡G

Private Sub Workbook_Open()
xPath$ = "C:\Users\user\Desktop\­n¶×¤JªºVBA.bas"    '¸ô®|ÀɦW¦Û¤v³]©w
ThisWorkbook.VBProject.VBComponents.Import xPath
End Sub
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 2# n7822123


¦pªG§Aªº¹q¸£¥u¦³§A¤@­Ó¨Ï¥ÎªÌªº¸Ü¡A§Ú·|«Øij¤èªk¤@¤ñ¸û²³æ¡C
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 3# n7822123
§Ú¸Õ¤F²Ä¤G­Ó¤èªk¡A§Ú¨C¦¸¥´¶}ÀÉ®×¥L´N¶×¤J¤@¦¸¼Ò²Õ@@
§Úªº¼Ò²Õ´N¦h¤F¦n´X­Ó¡A³o­n«ç»ò¸Ñ¨M????

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2019-6-19 21:47 ½s¿è

¦^´_ 5# s13030029


®¦......³o¬O­Ó°ÝÃD «¢«¢¡A¨º´N¥u¯à¥ý²¾°£¦A¶×¤J°Õ¡A¦p¤U

Private Sub Workbook_Open()
With ThisWorkbook.VBProject
  For Each vbc In .VBComponents
    If vbc.Type = 1 Then .VBComponents.Remove .VBComponents(vbc.Name) 'type 1=¤@¯ë¼Ò²Õ
  Next
End With
XPath$ = "C:\Users\user\Desktop\­n¶×¤JªºVBA.bas"  '¸ô®|ÀɦW¦Û¤v³]©w
ThisWorkbook.VBProject.VBComponents.Import XPath
End Sub
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

        ÀR«ä¦Û¦b : ¡i°µ¤Hªº¶}©l¡j¨C¤@¤Ñ³£¬O¬G¤Hªº¶}©l¡A¨C¤@­Ó®É¨è³£¬O¦Û¤vªºÄµ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD