Can someone tell me how to adjust this macro so I can use RGB colors and not required to use the 56 index colors?
Thanks!
Dim Shedule(100) As LectureBlock
Sub DrawShedule(b As Integer)
Dim LColor As Integer
Dim R As Range
Dim Str As String
With Shedule(b)
Select Case .Occupation
Case Is >= 0.5
Select Case .Occupation
Case Is <= 0.75
LColor = 35
Case Is <= 1
LColor = 36
Case Else
LColor = 22
End Select
Case Else
LColor = 37
End Select
Str = .Day & .Start & ":" & .Day & .End
Sheets("DISPLAY").Activate
Set R = Range(Str)
R.ColumnWidth = 18.09
R.RowHeight = 12
R.Merge
With R.Interior
.ColorIndex = LColor
.Pattern = xlSolid
End With
.....
Thanks!
Dim Shedule(100) As LectureBlock
Sub DrawShedule(b As Integer)
Dim LColor As Integer
Dim R As Range
Dim Str As String
With Shedule(b)
Select Case .Occupation
Case Is >= 0.5
Select Case .Occupation
Case Is <= 0.75
LColor = 35
Case Is <= 1
LColor = 36
Case Else
LColor = 22
End Select
Case Else
LColor = 37
End Select
Str = .Day & .Start & ":" & .Day & .End
Sheets("DISPLAY").Activate
Set R = Range(Str)
R.ColumnWidth = 18.09
R.RowHeight = 12
R.Merge
With R.Interior
.ColorIndex = LColor
.Pattern = xlSolid
End With
.....