sarges
Gebruiker
- Lid geworden
- 11 okt 2008
- Berichten
- 57
Beste mensen,
Zou iemand mij een nettere en snellere code kunnen geven voor het volgende?
Groet,
Serge
Zou iemand mij een nettere en snellere code kunnen geven voor het volgende?
Code:
If cbo1 > 25 Then
tables1.Cell(4, 5).Range.Font.Color = wdColorDarkRed
tables1.Cell(4, 5).Range = Me("cbo1").Text & "°C"
ElseIf cbo1 < 25 Then
tables1.Cell(4, 5).Range.Font.Color = wdColorBlack
tables1.Cell(4, 5).Range = Me("cbo1").Text & "°C"
End If
tables1.Cell(4, 7).Range = Me("cbo2").Text & "°C"
tables1.Cell(4, 9).Range = Me("cbo3").Text & "°C"
If cbo4 > 25 Then
tables1.Cell(5, 5).Range.Font.Color = wdColorDarkRed
tables1.Cell(5, 5).Range = Me("cbo4").Text & "°C"
ElseIf cbo4 < 25 Then
tables1.Cell(5, 5).Range.Font.Color = wdColorBlack
tables1.Cell(5, 5).Range = Me("cbo4").Text & "°C"
End If
tables1.Cell(5, 7).Range = Me("cbo5").Text & "°C"
tables1.Cell(5, 9).Range = Me("cbo6").Text & "°C"
'enz tot einde tabel van document, tabel kan bijvoorbeeld uit 20 regels bestaan.
Groet,
Serge