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

[µo°Ý] ¨â­Ó°ÝÃD¡G¤ñ¹ï°j°é & Àx¦s®æ°{Ã{

¦^´_ 8# stillfish00


   

¤£ª¾¹D¬°¤°»ò°õ¦æ°_¨Ó·|»¡¥¨¶°¦³°ÝÃD
­«¶}¤F¤]¬O¤@¼Ë
¤£²M·¡¿ù¦b­þ

§Úªº°õ¦æ¤è¦¡¬O
  1. Sub test()
  2.     SetRangeFlashing Target:=Range("B2"), ColorIndex:=3
  3. End Sub

  4. Static Sub SetRangeFlashing(Optional Target, Optional ColorIndex, Optional bQuit As Boolean)
  5.    
  6.     '¨Ï¥Î¤èªk:
  7.     '  ­n¶}©l°{Ã{½Ð©I¥s¡G
  8.     'SetRangeFlashing Target:=Range("B2"), ColorIndex:=3
  9.     '  ­n°±¤î°{Ã{½Ð©I¥s¡GSetRangeFlashing bQuit:=True

  10.     Dim dteNextTime As Date
  11.     Dim bStatus As Boolean
  12.     Dim RecordColor
  13.     Dim rngFlash As Range
  14.    
  15.     If bQuit Then
  16.       rngFlash.Interior.ColorIndex = RecordColor
  17.       Application.OnTime dteNextTime, "SetRangeFlashing", , False
  18.     Else
  19.       If Not IsMissing(Target) Then Set rngFlash = Target
  20.       If Not IsMissing(ColorIndex) Then RecordColor = ColorIndex
  21.      
  22.       rngFlash.Interior.ColorIndex = IIf(bStatus, RecordColor, xlColorIndexNone)
  23.       bStatus = Not bStatus
  24.       dteNextTime = Now + TimeValue("00:00:01")
  25.       Application.OnTime dteNextTime, "SetRangeFlashing"
  26.     End If
  27.    
  28. End Sub
½Æ»s¥N½X
¤£ª¾¹D³o¼Ë¶]µ{¦¡¬O¤£¬O¥¿½Tªº

³Â·Ð¤j¤jÀ°§Ú¬Ý¬Ý

ÁÂÁ  :   )

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-11-27 14:14 ½s¿è

¦^´_ 10# li_hsien
  1. Dim Rng As Range
  2. Private Sub twinkle()
  3.     Dim t As Date
  4.     '³]¥ß Rngªº½d³ò *********
  5.     With Worksheets(1)
  6.     For i = 1 To .Range("A65536").End(xlUp).Row
  7.         If .Range("A" & i).Interior.Color = 255 Then
  8.             .Range("A" & i).Interior.Color = -4105  '¬õ©³ªºÅܦ¨µL¶ñº¡
  9.             '******±NÄæ¦ì°O¤U¨Ó *****
  10.             If Rng Is Nothing Then
  11.                 Set Rng = Range("A" & i)
  12.             Else
  13.                 Set Rng = Union(Rng, Range("A" & i))
  14.             End If
  15.             '******±NÄæ¦ì°O¤U¨Ó *****
  16.         End If
  17.     Next
  18.     End With
  19.     t = Time
  20.     '**********Àx¦s®æ °{Ã{  ******
  21.     Do
  22.     DoEvents
  23.         If Time - t > TimeValue("00:00:01") Then
  24.             t = Time
  25.             Rng.Interior.Color = IIf(Rng.Interior.Color = 255, -4105, 255)
  26.         End If
  27.     Loop
  28.     '**********Àx¦s®æ °{Ã{  ******
  29. End Sub
½Æ»s¥N½X
¦^´_ 11# li_hsien
11# ªºµ{¦¡½X(½Ð½Æ»s©ó¤@¯ë¼Ò²Õ (Module1)¤¤ ¸Õ¸Õ
¥H¤Uµ{¦¡½X¤]¬O½Ð½Æ»s©ó¤@¯ë¼Ò²Õ¸Õ¸Õ
  1. Dim Rng As Range, Msg As Boolean    '¦b¼Ò²Õ³»ºÝ³]¥ß³o¼Ò²Õ¥i¥Î¤§ÅܼÆ
  2. Sub twinkle()
  3.     Msg = False
  4.     '³]¥ß Rngªº½d³ò *********
  5.     With Worksheets(1)
  6.         For i = 1 To .Range("A65536").End(xlUp).Row
  7.             If .Range("A" & i).Interior.Color = 255 Then
  8.                 .Range("A" & i).Interior.Color = -4105  '¬õ©³ªºÅܦ¨µL¶ñº¡
  9.                 '******±NÄæ¦ì°O¤U¨Ó *****
  10.                 If Rng Is Nothing Then
  11.                     Set Rng = Range("A" & i)
  12.                 Else
  13.                     Set Rng = Union(Rng, Range("A" & i))
  14.                 End If
  15.                 '******±NÄæ¦ì°O¤U¨Ó *****
  16.             End If
  17.         Next
  18.     End With
  19.     Application.Wait Time + #12:00:01 AM#  'µ¥­Ô1¬íÄÁ
  20.     SetRangeFlashing                       '°õ¦æ³oµ{§Ç
  21. End Sub
  22. Private Sub SetRangeFlashing() 'Àx¦s®æ °{Ã{
  23.     If Msg = True Then
  24.         Rng.Interior.Color = 255   'ÁÙ­ì¬õ¦â
  25.         Exit Sub
  26.     End If
  27.     Rng.Interior.Color = IIf(Rng.Interior.Color = 255, -4105, 255)
  28.     Application.OnTime Time + #12:00:01 AM#, "SetRangeFlashing"
  29. End Sub
  30. Sub Stop_Flashing()   '°±¤îÀx¦s®æ°{Ã{
  31.     Msg = True
  32. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 12# GBKEE

½Ð°Ý¤@¤UªO¤j
Q1:
Set Rng = Union(Rng, Range("A" & i))
unionªº¥Îªk¬O??? §ârange("A"& i) ¥[¤JRng¸Ì­±¶Ü??
Rng¬O°}¦C¶Ü??? ÁÙ¬O???

Q2:
  '**********Àx¦s®æ °{Ã{  ******
    Do
    DoEvents
        If Time - t > TimeValue("00:00:01") Then
            t = Time
            ¬°¤°»ò¨S¦³¬Ý¨ì©¹¤U²Ö¥[ªºÄæ¦ì¼Æ¡ARng¥i¥H©¹¤U¤@Äæ¦ì¶]§r??? ³æ¬Ý³o¼Ë¦n¹³¥u¬O­ì¦a°{¦P¤@­Ó
            Rng.Interior.Color = IIf(Rng.Interior.Color = 255, -4105, 255)
        End If
    Loop
    '**********Àx¦s®æ °{Ã{  ******

Q3:
¥t¥~ÁÙ·Q½Ð°ÝªO¤j
¦³¤°»ò¤èªk¥i¥H§â°}¦C­È¤@¦¸¦L¥X¨Ó¶Ü??
¦Ó¤£¥ÎFOR°j°é¶]



¤£¦n·N«ä°ÝÃD¦³ÂI¦h

ÁÂÁ¤j¤j    :  )

TOP

¦^´_ 13# li_hsien
Q1:
     Set Rng = Union(Rng, Range("A" & i))
    unionªº¥Îªk¬O??? §ârange("A"& i) ¥[¤JRng¸Ì­±¶Ü?? :¨S¿ùRng¬O°}¦C¶Ü??? ¬ORange
  1. 'Union ¤èªk ¶Ç¦^¨â­Ó©Î¦h­Ó½d³òªº¦X¨Ö½d³ò¡C
  2. Option Explicit
  3. Sub EX()
  4. Dim Rng As Range
  5. Set Rng = [A1:A5]
  6. Set Rng = Union([A1:A5], [C5:C15])
  7. MsgBox Rng.Address
  8. End Sub
½Æ»s¥N½X

Q2:
     ¬°¤°»ò¨S¦³¬Ý¨ì©¹¤U²Ö¥[ªºÄæ¦ì¼Æ¡ARng¥i¥H©¹¤U¤@Äæ¦ì¶]§r??? ³æ¬Ý³o¼Ë¦n¹³¥u¬O­ì¦a°{¦P¤@­Ó
     ¬Ý Q1: ªº»¡©ú
Q3:
¦³¤°»ò¤èªk¥i¥H§â°}¦C­È¤@¦¸¦L¥X¨Ó¶Ü?? ¦Ó¤£¥ÎFOR°j°é¶]
  1. Option Explicit
  2. Sub EX()
  3. Dim AR()
  4. AR = Array(5, 10, 15, 20)
  5. [A1].Resize(1, UBound(AR) + 1) = AR
  6. [A5].Resize(UBound(AR) + 1) = Application.WorksheetFunction.Transpose(AR)
  7. MsgBox Join(AR, vbLf)
  8. 'WorksheetFunction.Transpose:Âà¸m(¤u§@ªí¨ç¼Æ)
  9. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 14# GBKEE

«D±`·PÁªO¤j

§Ú¤S¦h¤F¦n¦h¸gÅç­È¤F!!!

:   )

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¤£¤@©w²y²y¬O¦n²y¡A¦ý¬O¦³¾ú½mªº±j¥´ªÌ¡AÀH®É³£¥i¥H´§´Î¡C
ªð¦^¦Cªí ¤W¤@¥DÃD