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

[µo°Ý] ¦p¦ó±oª¾ A.xls«ê¥©¦³§O¤H¦b¨Ï¥Î???

[µo°Ý] ¦p¦ó±oª¾ A.xls«ê¥©¦³§O¤H¦b¨Ï¥Î???

¤S¦³¤@¹Á¸Õ¡A½Ð±Ð±M®a¤j¤j­Ì¨ó§U¬ð¯}
¦]±¡¨Æ»Ý­n¡A¿é¤JªÌ²³ ¥B¤£¦P¦aÂI
±N¸ê®Æ§¨(¥X¯Ê¶Ô¼úÃgµn¿ý)¸m©ó  "ºô¸ôªÚ¾F"¤¤ ¨Ñ²³¾É®v­Ì¦U¦Ûµn¿ý
1.¸ê®Æ§¨§t(1µn¿ý.xls,1¸ê®Æ®w.xls,2µn¿ý.xls,2¸ê®Æ®w.xls,------,Á`ºÞ²z.xls,Á`¸ê®Æ®w.xls)
2.¥­®É(¾É®v1) (¶}1µn¿ý.xls µn¿ý«á ¶Ç¦^1¸ê®Æ®w.xls )---1¸ê®Æ®w.xls ¥u¦bÀK¨ºopen,close
           (¾É®v2) (¶}2µn¿ý.xls µn¿ý«á ¶Ç¦^2¸ê®Æ®w.xls )---2¸ê®Æ®w.xls ¥u¦bÀK¨ºopen,close----
3.¥D¥ô¶}Á`ºÞ²z.xls,±ý§@Á`¸ê®Æ®w.xls¦V1¸ê®Æ®w.2¸ê®Æ®w.---¨ú¦^¸ê®Æ(¤]¬O·¥µu®É¶¡5¬í)
¥H¤W§¡§¹¦¨VBA³B²z
°ÝÃD¦p¤U
¾É®v»P¥D¥ô   ­Y¦b  ¦s¨ú¤§¶¡  ÀK¨º  «ê¥©¦P®É   ´N¥X²{ error
´N±Ð©ó¤j¤j¥ý¶i
    1¸¹¤H¥ý¶}A.xls  ©|¥¼ .close«e  2¸¹¤H¤]­n¥´¶}A.xls  
2¸¹¤H¦p¦ó±oª¾ A.xls«ê¥©¦³§O¤H¦b¨Ï¥Î???
¦¹®É¦p¦ó¥s¹q¸£¼È°±20¬í¦A°Ê§@??
¦p¦¹»¡©ú  §Æ±æ¯à¤F¡C
½Ð¨D±Ï´©¡IÁÂÁÂ

¦^´_ 1# yangjie
§A¥i¥H¥t¥~¼W¥[¤@­Ó¤pÀÉ®× (¤å¦rÀÉ¡B¥ç©Î¬O¸ê®Æ®w)¡A
§@¬°¶}±ÒÃö³¬ªº±±¨î»PºÞ²z (Key File) (¸m©ó°õ¦æ°Ï)¡C
©ó¶}±Ò EXCEL Àɮ׮ɡA¦b¤@¶i¤J¦P®É¥ý¥æ¥Ñ
Private Sub Workbook_Open() §PÂ_¤W­z¤§¤pÀÉ®×
¤º®e¬°¦ó ¡H
(Ä´¦p¡G 1 - ¬°¯u¡Aªí¥Ü¤w¦³¤H¶}±Ò¡AÀH§Y¸õÂ÷Ãö³¬ EXCEL¡C
            ©Î¥X¥Ü°T®§§iª¾¡y§O¤H¦b¨Ï¥Î¤¤¡zµ¥´£¥Ü¡C
        0 - ¬°§_¡Aªí¥ÜµL¤H¶i¤J¡A¶¶¤â±N¥¦­×¥¿¬° 1 ¨ÃÀH§Y
            ¤©¥H¦sÀÉÃö³¬(Key File)¡A¥H¨Ñ¥L¤H¦A¶}±ÒÀ˵ø¡C
            ¦bÃö³¬ EXCEL Â÷¶}«e¡A«h¦A±N¥¦ªº¤º®e­×¥¿¬° 0¡C)
¦p¦¹«K¥i¹F¨ì§A©Ò»Ý¤§±±ºÞ¤F¡C

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-6-26 10:53 ½s¿è

¦^´_ 1# yangjie


¥i°Ñ¦Ò³o¸Ì

¨Ï A.xls ¬°¦@¥Î¬¡­¶Ã¯
  1. Option Explicit
  2. Sub Ex()
  3.    Dim users, A
  4.    users = Workbooks("¦@¥Î.xls").UserStatus
  5.    A = Application.WorksheetFunction.Index(Application.WorksheetFunction.Transpose(users), 1)
  6.    MsgBox "Users : " & UBound(users) & vbLf & Join(A, vbLf)
  7. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 3# GBKEE
½Ð±ÐGBKEE
¦³µL¿ìªk¦bA.xls¤º¥ÎVBA ¨Ï B.xls¦¨¬°¦@¥Î¬¡­¶Ã¯¥i¨Ñ¦h¤H¨Ï¥Îª¬ºA

TOP

¦^´_ 2# c_c_lai
½Ð±Ð¤j¤j
¥iÀ°¦£¥Ü½d¤@¤U

TOP

¦^´_ 3# GBKEE
½Ð±ÐGBKEE
¥i§_  ¶Ç¦^  ¦@¥Î¤H¼Æ(¶Ç¦^¤H¼Æn)?
³o¼Ë¥i§Q¥În<2§Y¥iÄ~Äò-----

TOP

¦^´_ 5# yangjie
³o½g¤å³¹¹ï§AÀ³¸Ó·|¦³©ÒÀ°§Uªº¡G
Who open VBA Excel 2003/WinXP

TOP

¦^´_ 6# yangjie


   
¦@¥Î¤H¼Æ(¶Ç¦^¤H¼Æn)?
3# ªºµ{¦¡½X,´N¬O°Ú.
  1. Option Explicit
  2. Const ExFile = "D:\AA.XLS"
  3. Private Sub ³]¬°¦@¥Î¬¡­¶Ã¯()
  4.     Application.DisplayAlerts = False
  5.     With Workbooks.Open(ExFile)
  6.         If Not .ReadOnly And Not .MultiUserEditing Then
  7.             'ReadOnly ÄÝ©Ê          ¦pªGª«¥ó¬O¥H°ßŪ¼Ò¦¡¶}±Ò¡A«h¶Ç¦^ True¡C°ßŪ Boolean
  8.             'MultiUserEditing ÄÝ©Ê  ¦pªG¬¡­¶Ã¯¬O¥H¦@¥Î²M³æ¼Ò¦¡¶}±Òªº«h¬° True¡C°ßŪ Boolean¡C
  9.             .SaveAs Filename:=.FullName, AccessMode:=xlShared       '¦sÀɬ°¦@¥Î¼Ò¦¡
  10.             .AutoUpdateFrequency = 5    'AutoUpdateFrequency ÄÝ©Ê   ³]©w¥H¤ÀÄÁ¬°³æ¦ì¶Ç¦^©Î³]©w¹ï¦@¥Î¬¡­¶Ã¯¶i¦æ¦Û°Ê§ó·sªº®É¶¡¶¡¹j¡CŪ/¼g Long¡C
  11.             .ChangeHistoryDuration = 30 'ChangeHistoryDuration ÄÝ©Ê ³]©w¦@¥Î¬¡­¶Ã¯ªº­×­q°O¿ý¤¤©Ò­nÅã¥Ü­×­q¸ê°Tªº¤Ñ¼Æ¡CŪ/¼g Long
  12.         End If
  13.         .Close True
  14.     End With
  15.     Application.DisplayAlerts = True
  16. End Sub
  17. Private Sub ¨ú®ø³]¬°¦@¥Î¬¡­¶Ã¯()
  18.     Application.DisplayAlerts = False
  19.     With Workbooks.Open(ExFile)
  20.       If Not .ReadOnly And .MultiUserEditing Then .ExclusiveAccess
  21.         'Not .ReadOnly:¨S¦³¤H¶}±Ò³oÀÉ®×
  22.         '.MultiUserEditing :¬O¦@¥Î¬¡­¶Ã¯
  23.         .Close True
  24.     End With
  25.     Application.DisplayAlerts = True
  26. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 8# GBKEE
·PÁÂGBKEEª©¤j    ¾Ç²ß»á¦h  ¤]¸Ñ¨M嘞§x´b

TOP

        ÀR«ä¦Û¦b : Ä@­n¤j¡B§Ó­n°í¡B®ð­n¬X¡B¤ß­n²Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD