Beste allemaal,
ik heb een bestand gemaakt met een stukje vba zodat een cel een bepaalde achtergrondkleur en fontkleur krijgt. Maar als mijn collega (ook Office 2003) gebruik maakt van dit bestand krijgt hij in een aantal gevallen een andere kleur. Wat kan hiervan de reden zijn?
Hier het stukje vba:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim x As Range
For Each x In ActiveSheet.Range("q8:bn33")
With x
Select Case .Value
Case "1": .Interior.Color = RGB(255, 0, 255)
.Font.Color = RGB(255, 0, 255)
Case "2": .Interior.Color = RGB(255, 204, 153)
.Font.Color = RGB(255, 204, 153)
Case "3": .Interior.Color = RGB(255, 255, 255)
.Font.Color = RGB(0, 0, 0)
Case "4": .Interior.Color = RGB(0, 255, 0)
.Font.Color = RGB(0, 255, 0)
Case "5": .Interior.Color = RGB(0, 255, 255)
.Font.Color = RGB(0, 255, 255)
Case "6": .Interior.Color = RGB(204, 153, 255)
.Font.Color = RGB(204, 153, 255)
Case "7": .Interior.Color = RGB(255, 255, 0)
.Font.Color = RGB(255, 255, 0)
Case "8": .Interior.Color = RGB(255, 0, 0)
.Font.Color = RGB(255, 0, 0)
Case "9": .Interior.Color = RGB(128, 128, 128)
.Font.Color = RGB(128, 128, 128)
Case "10": .Interior.Color = RGB(0, 128, 0)
.Font.Color = RGB(0, 128, 0)
Case "11": .Interior.Color = RGB(204, 255, 255)
.Font.Color = RGB(204, 255, 255)
Case "12": .Interior.Color = RGB(255, 153, 204)
.Font.Color = RGB(255, 153, 204)
Case "13": .Interior.Color = RGB(0, 102, 204)
.Font.Color = RGB(0, 102, 204)
Case Else
.Interior.ColorIndex = xlNone
End Select
End With
Next
End Sub
ik heb een bestand gemaakt met een stukje vba zodat een cel een bepaalde achtergrondkleur en fontkleur krijgt. Maar als mijn collega (ook Office 2003) gebruik maakt van dit bestand krijgt hij in een aantal gevallen een andere kleur. Wat kan hiervan de reden zijn?
Hier het stukje vba:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim x As Range
For Each x In ActiveSheet.Range("q8:bn33")
With x
Select Case .Value
Case "1": .Interior.Color = RGB(255, 0, 255)
.Font.Color = RGB(255, 0, 255)
Case "2": .Interior.Color = RGB(255, 204, 153)
.Font.Color = RGB(255, 204, 153)
Case "3": .Interior.Color = RGB(255, 255, 255)
.Font.Color = RGB(0, 0, 0)
Case "4": .Interior.Color = RGB(0, 255, 0)
.Font.Color = RGB(0, 255, 0)
Case "5": .Interior.Color = RGB(0, 255, 255)
.Font.Color = RGB(0, 255, 255)
Case "6": .Interior.Color = RGB(204, 153, 255)
.Font.Color = RGB(204, 153, 255)
Case "7": .Interior.Color = RGB(255, 255, 0)
.Font.Color = RGB(255, 255, 0)
Case "8": .Interior.Color = RGB(255, 0, 0)
.Font.Color = RGB(255, 0, 0)
Case "9": .Interior.Color = RGB(128, 128, 128)
.Font.Color = RGB(128, 128, 128)
Case "10": .Interior.Color = RGB(0, 128, 0)
.Font.Color = RGB(0, 128, 0)
Case "11": .Interior.Color = RGB(204, 255, 255)
.Font.Color = RGB(204, 255, 255)
Case "12": .Interior.Color = RGB(255, 153, 204)
.Font.Color = RGB(255, 153, 204)
Case "13": .Interior.Color = RGB(0, 102, 204)
.Font.Color = RGB(0, 102, 204)
Case Else
.Interior.ColorIndex = xlNone
End Select
End With
Next
End Sub