View Single Post
  #4 (permalink)  
Vecchio 10-18-2007, 10:44 PM
Frediano Frediano non è in linea
Junior Member
 
Registrato dal: Aug 2007
Messaggi: 3
predefinito

Prova con questo e vedi se ti può andar bene:

codice:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo Fine
Application.ScreenUpdating = False
Dim Griglia As Range, Rig As Integer, Col As Integer
Set Griglia = Range("griglia")
With Griglia
If Intersect(Target, Griglia) Is Nothing Then Exit Sub
Griglia.Select
With Selection.Interior
.ColorIndex = 2
End With
Application.EnableEvents = False
Rig = Target.Row
.Rows(Rig - 2).Select
With Selection.Interior
.ColorIndex = 36
End With
Col = Target.Column
.Columns(Col - 1).Select
With Selection.Interior
.ColorIndex = 36
End With
End With
Target.Select
Fine:
Application.EnableEvents = True
End Sub
Rispondi quotando