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

¦³Ãö´¡¤J¹Ï¤ùªº°ÝÃD

¦^´_ 30# skyutm
¥[¤@¦æOn Error Resume Next¡A³o¼Ë´N¥i¥H¸Ñ¨M¤F¡C¡]¤£ª¾³o¼Ë¦³µL­·ÀI¶Ü¡H¡^
¬O¦³ªº ¦p¦³¿ù»~ªº»yªk©ÎÅܼƮѼg¿ù»~, VBA¬O¤£³B¸Ìªº.
½ÐªþÀɬݬÝ

TOP

¦^´_ 31# GBKEE
ª©¤j±z¦n¡I¦A¦¸·PÁ¡Cªþ¤WÀɮסC¤u§@ªí¬O¡u¦¨ÁZÀx¦s¡v¥¦¬O¡u¾ÇÄyï¡v¤u§@ªíªº½Æ»s¡C¥¨¶°¬Omacro24

·s¸ô¦¨ÁZ¨t²Î.rar (379.76 KB)

TOP

¦^´_ 32# skyutm
EnableEvents ÄÝ©Ê ¦pªG«ü©wª«¥ó¯àIJµo¨Æ¥ó¡A«h¥»Äݩʬ° True¡CŪ/¼g Boolean¡C
  1. Sub macor24()
  2.     '¸Ñ°£«OÅ@¡u¦¨ÁZÀx¦s¡vªí®æ¡õ'
  3.    Application.EnableEvents = False  '°±¤îª«¥ó¯àIJµo¨Æ¥ó
  4.     Sheets("¦¨ÁZÀx¦s").Unprotect Password:="6323"
  5.     '¸Ñ°£«OÅ@¡u¦¨ÁZÀx¦s¡vªí®æ¡ô
  6.     Dim a, b, u, v, r, n As String
  7.     a = Sheets("°ò¥»³]©w").Range("a6").Value
  8.     b = Sheets("°ò¥»³]©w").Range("a8").Value
  9.     u = Sheets("°ò¥»³]©w").Range("j1").Value
  10.     v = Sheets("°ò¥»³]©w").Range("j2").Value
  11.    r = "C:\Documents and Settings\Administrator\®à­±\"
  12.     n = a & "¾Ç¦~«×" & b & "¾Ç´Á" & u & "¦~" & v & "¯Z¦¨ÁZÀÉ"
  13.    
  14.     Sheets("¦¨ÁZÀx¦s").Copy
  15.     With ActiveWorkbook
  16.          Application.DisplayAlerts = False
  17.          .SaveAs Filename:=r & n & ".xls", FileFormat:=51
  18.          Application.DisplayAlerts = False
  19.          '«OÅ@¡u¦¨ÁZÀx¦s¡vªí®æ¡õ'
  20.          Sheets("¦¨ÁZÀx¦s").Activate
  21.          ActiveSheet.EnableSelection = xlUnlockedCells
  22.          Sheets("¦¨ÁZÀx¦s").Protect Password:="6323"
  23.          '«OÅ@¡u¦¨ÁZÀx¦s¡vªí®æ¡ô'
  24.          .Close savechanges:=True
  25.     End With
  26.     Application.EnableEvents = True '«ì´_ª«¥ó¯àIJµo¨Æ¥ó
  27. End Sub
½Æ»s¥N½X
  1. Option Explicit
  2. Sub Worksheet_Activate()
  3. ' ***  On Error Resume Next  ¥i§R±¼
  4.     Application.ScreenUpdating = False
½Æ»s¥N½X

TOP

·PÁª©¤j¡I§Ú¤S¥hºô¸ô¤W§ä¤F¤@¤U¦³ÃöEnableEventsªº¸ê®Æ¡AÅý§Ú¦h¤W¤F¤@½Ò¡A¤]¶êº¡ªº¸Ñ¨M³o­Ó°ÝÃD¤F¡C

TOP

        ÀR«ä¦Û¦b : ¬O«D·í±Ð¨|¡AÆg¬ü§@ĵ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD