View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Thyagaraj Thyagaraj is offline
external usenet poster
 
Posts: 51
Default Border the selection cell


Dave Patrick wrote:
Add your code to something like this.

Dim OldRange As Range

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Set OldRange = Selection
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
With OldRange
.Interior.ColorIndex = xlNone
End With
With Target
.Interior.ColorIndex = 46
.Interior.Pattern = xlSolid
End With
Set OldRange = Target
End Sub

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Thyagaraj" wrote:
| I know the code to get border and remove the border but this should
| happen when ever the cell is changed how is this possible........?
|
| Any suggesions please
|
|
| Regards
| A
|

Dear Dave Patrick ,

Thanks


Reg
A