Ik heb een deel van een WBS macro hieronder gezet. Nu zou graag zien dat naast het lettertype ook de rij opgemaakt wordt. dit met dezelfde argumenten. Wel moet de hele rij, die dynamisch is, worden opgemaakt. in de laatste kolom staat normaal niets m.u.v. van rij 6 en rij 7 daar staat altijd iets.
opmaak bij laatste deel moet RGB 217,217,217 zijn. bij ander RGB 191,191,191
opmaak bij laatste deel moet RGB 217,217,217 zijn. bij ander RGB 191,191,191
Code:
'Populate target cell with WBS number
Cells(r, 1).Value = wbs
'Get rid of annoying "number stored as text" error
Cells(r, 1).Errors(xlNumberAsText).Ignore = True
'Apply text format: next row is deeper than current
If Cells(r + 1, 2).IndentLevel > Cells(r, 2).IndentLevel Then
Cells(r, 1).Font.Bold = True
Cells(r, 2).Font.Bold = True
Cells(r, 3).Font.Bold = True
Cells(r, 4).Font.Bold = True
Cells(r, 7).Font.Bold = True
'Else (next row is same/shallower than current) no format
Else
Cells(r, 1).Font.Bold = False
Cells(r, 2).Font.Bold = False
Cells(r, 3).Font.Bold = False
Cells(r, 4).Font.Bold = False
Cells(r, 7).Font.Bold = False
End If
'Special formatting for master (whole number) tasks)
If Cells(r, 2).IndentLevel = 0 Then
Cells(r, 1).Font.Bold = True
Cells(r, 2).Font.Bold = True
Cells(r, 3).Font.Bold = True
Cells(r, 4).Font.Bold = True
Cells(r, 7).Font.Bold = True
'Add whatever other formatting you want here
End If