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

[µo°Ý] ¦Û°Ê¶}±Ò«ü©wªºÀɮשM¼Ð¥Ü©³¦â¡C

[µo°Ý] ¦Û°Ê¶}±Ò«ü©wªºÀɮשM¼Ð¥Ü©³¦â¡C

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2019-8-26 01:50 ½s¿è

´ú¸ÕÀÉ®× :   ¦Û°Ê¶}±Ò«ü©wªºÀÉ®×.rar (114.66 KB)

½Ð°Ý :¤U¦C»Ý¨Dªº¥¿½T»yªk ?
»Ý¨D :
1_¦Û°Ê¶}±Ò«ü©w¦WºÙªºÀÉ®×~ EX :  "539_¤­¦æ±Æ§Ç-??Á`Äý-(####-##-##).xls"

2_±N«ü©w¦WºÙªºÀɮ׶}±Ò«á¡A¦A±NSheet1©MSheet2ªº¤U¦C½d³ò¼Ð¥Ü15¸¹©³¦â      
        Range("BA3:BF12").Interior.ColorIndex = 15
        Range("BA15:BF24").Interior.ColorIndex = 15
        Range("BA27:BF36").Interior.ColorIndex = 15
        Range("BA39:BF48").Interior.ColorIndex = 15
        Range("BA51:BF60").Interior.ColorIndex = 15
        Range("BA63:BF72").Interior.ColorIndex = 15
        Range("BA75:BF84").Interior.ColorIndex = 15
3_±N§¹¦¨²Ä2¶µ»Ý¨DªºÀÉ®×Ãö³¬¡C      


¥H¤W ¸Û½Ð¦U¦ì¤j¤jÀ°¦£! ÁÂÁ¦U¦ì!

¦^´_ 1# ziv976688
¤j·§¬O³o¼Ë§a~~
  1. Sub ¦Û°Ê¶ñ¦â_Click()
  2.     Application.ScreenUpdating = False
  3.    
  4.     Dim databook As Workbook
  5.     Path = ThisWorkbook.Path 'Àɮ׸ô®|
  6.     Filename = Sheets(1).Range("A1").Value '«ü©w¦WºÙ
  7.     Set databook = Workbooks.Open(Path & "\" & Filename) '¶}±ÒÀÉ®×
  8.     With databook.Sheets(1)
  9.         .Range("BA3:BF12").Interior.ColorIndex = 15
  10.         .Range("BA15:BF24").Interior.ColorIndex = 15
  11.         .Range("BA27:BF36").Interior.ColorIndex = 15
  12.         .Range("BA39:BF48").Interior.ColorIndex = 15
  13.         .Range("BA51:BF60").Interior.ColorIndex = 15
  14.         .Range("BA63:BF72").Interior.ColorIndex = 15
  15.         .Range("BA75:BF84").Interior.ColorIndex = 15
  16.     End With
  17.     With databook.Sheets(2)
  18.         .Range("BA3:BF12").Interior.ColorIndex = 15
  19.         .Range("BA15:BF24").Interior.ColorIndex = 15
  20.         .Range("BA27:BF36").Interior.ColorIndex = 15
  21.         .Range("BA39:BF48").Interior.ColorIndex = 15
  22.         .Range("BA51:BF60").Interior.ColorIndex = 15
  23.         .Range("BA63:BF72").Interior.ColorIndex = 15
  24.         .Range("BA75:BF84").Interior.ColorIndex = 15
  25.     End With
  26.     databook.Save  'Àx¦s
  27.     databook.Close  'Ãö³¬
  28.     Application.ScreenUpdating = True
  29. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# s13030029
·PÁ¦^ÂСC
´ú¸Õµ²ªG:¥u¦³¼Ð¥Ü1­ÓÀɮסA¤£¬O¨C¤@­ÓÀɮ׳£¦³¼Ð¥Ü¡C

TOP

¦^´_ 3# ziv976688
§Ú¥u«ü©w"A1"Àx¦s®æ¬°ÀɦW
¦]¬°§Ú¤£ª¾¹D§A­n±q­þ¸Ì³]©w§A­nÅܧóÀɮתºÀɦW

TOP

¦^´_ 3# ziv976688
¥[­Ó°j°é§a
  1. Sub ¦Û°Ê¶ñ¦â_Click()
  2.     Application.ScreenUpdating = False
  3.    
  4.     Dim databook As Workbook
  5.     Path = ThisWorkbook.Path 'Àɮ׸ô®|
  6.    
  7.     For i = 1 To Sheets(1).Range("A300").End(xlUp).Row
  8.     Filename = Cells(i, "A").Value 'ÀɦW
  9.     Set databook = Workbooks.Open(Path & "\" & Filename) '¶}±ÒÀÉ®×
  10.     With databook.Sheets(1)
  11.         .Range("BA3:BF12").Interior.ColorIndex = 15
  12.         .Range("BA15:BF24").Interior.ColorIndex = 15
  13.         .Range("BA27:BF36").Interior.ColorIndex = 15
  14.         .Range("BA39:BF48").Interior.ColorIndex = 15
  15.         .Range("BA51:BF60").Interior.ColorIndex = 15
  16.         .Range("BA63:BF72").Interior.ColorIndex = 15
  17.         .Range("BA75:BF84").Interior.ColorIndex = 15
  18.     End With
  19.     With databook.Sheets(2)
  20.         .Range("BA3:BF12").Interior.ColorIndex = 15
  21.         .Range("BA15:BF24").Interior.ColorIndex = 15
  22.         .Range("BA27:BF36").Interior.ColorIndex = 15
  23.         .Range("BA39:BF48").Interior.ColorIndex = 15
  24.         .Range("BA51:BF60").Interior.ColorIndex = 15
  25.         .Range("BA63:BF72").Interior.ColorIndex = 15
  26.         .Range("BA75:BF84").Interior.ColorIndex = 15
  27.     End With
  28.     databook.Save  'Àx¦s
  29.     databook.Close  'Ãö³¬
  30.     Next
  31.    
  32.     Application.ScreenUpdating = True
  33. End Sub
½Æ»s¥N½X

TOP

¦^´_ 5# s13030029
ÁÂÁ±zªº¦A¦¸«ü±Ð~¥i¥H¤F^^

TOP

Sub TEST()
Dim P$, F$, xD, A, Tm, ADR$, xB As Workbook, xS As Worksheet
Tm = Timer
P = ThisWorkbook.Path
Set xD = CreateObject("Scripting.Dictionary")
Do
  If F = "" Then F = Dir(P & "\*.xls") Else F = Dir()
  If F = "" Then Exit Do
  If F Like "539_¤­¦æ±Æ§Ç-??Á`Äý-(####-##-##).xls" Then xD(F) = ""
Loop
If xD.Count = 0 Then Exit Sub
Application.ScreenUpdating = False
ADR = "BA3:BF12,BA15:BF24,BA27:BF36,BA39:BF48,BA51:BF60,BA63:BF72,BA75:BF84"
For Each A In xD.keys
    Set xB = Workbooks.Open(P & "\" & A)
    For Each xS In xB.Sheets
        xS.Range(ADR).Interior.ColorIndex = 15
    Next
    xB.Close 1
Next
MsgBox Timer - Tm
End Sub


==================================

TOP

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2019-8-28 16:29 ½s¿è

¦^´_ 7# ­ã´£³¡ªL
·PÁª©¥Dªº«ü±Ð¡C
­ì´£°Ýªºµ{¦¡½X¤]¬OÂ^¨ú±zªºµ{¦¡½X^^"
§¹¥þ²Å¦X»Ý¨D~¦A¦¸·PÁ±z^^

TOP

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