r r = 0 To &amp;H100 Step &amp;H40
            If r = &amp;H100 Then
               rA = r - 1
            Else
               rA = r
            End If
            lIndex = lIndex + 1
            With m_tBI.bmiColors(lIndex)
               .rgbRed = rA: .rgbGreen = gA: .rgbBlue = bA
            End With
         Next r
      Next g
   Next b
   
End Sub
Private Sub CreateMono()
   ' Monochrome palette
   With m_tBI.bmiColors(1)
      .rgbBlue = 255
      .rgbGreen = 255
      .rgbRed = 255
   End With
End 