If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > animate borders

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-16-06, 17:39
Jay59 Jay59 is offline
Registered User
 
Join Date: Sep 2006
Posts: 162
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
Reply With Quote
  #2 (permalink)  
Old 10-16-06, 22:46
savbill savbill is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On