Merhabalar,
aşağıdaki iki kodu aynı anda nasıl çalıştırabilecegim hakıında yardımcı olabilirseniz cok sevinirim.
ikisini alıp yapıştırınca hata veriyor. sanırım aynı ibaşlık oldugu için.
Şimdiden teşekkürler
KOD : 1
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = 0 'Turn off previous use
If Cells(1, 1) = "." Then Exit Sub
Range("A" & ActiveCell.Row & ":AG" & ActiveCell.Row).Interior.ColorIndex = 45
End Sub
KOD : 2
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static EskiHucre As Range
If Target.Interior.ColorIndex <> xlColorIndexNone Then
EskiHucre.Interior.ColorIndex = xlColorIndexNone
Exit Sub
ElseIf Not EskiHucre Is Nothing Then
EskiHucre.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 6
Set EskiHucre = Target
End Sub
aşağıdaki iki kodu aynı anda nasıl çalıştırabilecegim hakıında yardımcı olabilirseniz cok sevinirim.
ikisini alıp yapıştırınca hata veriyor. sanırım aynı ibaşlık oldugu için.
Şimdiden teşekkürler
KOD : 1
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = 0 'Turn off previous use
If Cells(1, 1) = "." Then Exit Sub
Range("A" & ActiveCell.Row & ":AG" & ActiveCell.Row).Interior.ColorIndex = 45
End Sub
KOD : 2
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static EskiHucre As Range
If Target.Interior.ColorIndex <> xlColorIndexNone Then
EskiHucre.Interior.ColorIndex = xlColorIndexNone
Exit Sub
ElseIf Not EskiHucre Is Nothing Then
EskiHucre.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 6
Set EskiHucre = Target
End Sub
