Results 1 to 2 of 2

Thread: animate borders

  1. #1
    Join Date
    Sep 2006
    Posts
    162

    Unanswered: animate borders

    Is there a way to add some simple animations to a cell border. I want a border around the cell to pulse on and off or a color i specify.

    TIA

  2. #2
    Join Date
    Feb 2004
    Posts
    533
    Quote Originally Posted by Jay59
    Is there a way to add some simple animations to a cell border. I want a border around the cell to pulse on and off or a color i specify.

    TIA
    you will need to create a custom VBA procedure to do this. A Pulsing Effect would require a looping event and it would only cycle for a limited amount of time as the activation of VBA procedure in the background would prevent you from doing anything while the process was running.

    Here is a very basic example of using code in the Worksheet module
    Code:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    
    With ActiveCell
      nPrevWeight = .Borders.Weight
      nPrevColor = .Borders.ColorIndex
      .Borders.Weight = 3
      For i = 1 To 5
      If vColor = 3 Then
        vColor = 5
      Else
        vColor = 3
      End If
      .Borders.ColorIndex = vColor
      Application.Wait (Now + TimeValue("0:00:01"))
      Next
      .Borders.Weight = nPrevWeight
      .Borders.ColorIndex = nPrevColor
    End With
    
    End Sub
    ~

    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •