• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to imitate flashing?

Eloise T

Active Member
Please see attachment. I would like the macro "StartFlashing" to cause any cell in Column K to flash if it contains the Unicode U221A which is the square root symbol (). Thank you in advance for any assistance.

Code:
Sub StartFlashing()
          Dim Ws As Worksheet, Rg(1) As Range
          Application.ScreenUpdating = False
    For Each Ws In Worksheets
              Set Rg(1) = Ws.Cells(Rows.Count, 1).End(xlUp)
        Do Until Rg(1).FormatConditions.Add Type:=xlExpression, Formula1:="=IF($K$3:$K$6000)=UNICHAR(221A) Or Rg(1).Row < 3
              If Rg(1)(0).Value = "" Or Rg(1)(0).FormatConditions.Add Type:=xlExpression, Formula1:="=IF($K$3:$K$6000)=UNICHAR(221A) Then "StartFlashing"
                  Set Rg(0) = Rg(1)
              Else
                  Set Rg(0) = Rg(1).End(xlUp)
                    If Rg(0).Row < 3 Then Set Rg(0) = Ws.[A3]
              End If
        
'            Debug.Print Rg(1).Address
        
            With Range(Rg(0), Rg(1)(1, 8)).Columns
                .FormatConditions.Add Type:=xlExpression, Formula1:="=IF($K$3:$K$6000)=UNICHAR(221A) Then "StartFlash"
            End With
              Set Rg(1) = Rg(0).End(xlUp)
              xTime = Now + TimeSerial(0, 0, 1)
            Application.OnTime xTime, "StartFlashing", , True
        Loop
    Next
          Erase Rg
          Application.ScreenUpdating = True
          Beep
End Sub
Sub StopFlashing()
    Application.OnTime xTime, "StartFlashing", , False
End Sub
 

Attachments

  • Imitate flashing III.xlsm
    405.3 KB · Views: 8
Back
Top