Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enum type variables
Good morning
For exercise, I have weekdays in row 1, Sun, Mon, Tue...Sat and repeat To highlight every Sunday, I use this code below. I would like to seek advice if I can read contents in cells as value in the enum variable, ie can I get rid of the first set of select case please? Enum wkdays sun = 6 End Enum Sub test() Dim eidx As wkdays For k = 1 To Cells(1, 1).End(xlToRight).Column Select Case Cells(1, k) Case "Sun" eidx = sun Case Else eidx = 0 End Select Select Case eidx Case sun Columns(k).Interior.ColorIndex = sun End Select Next k End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 97 Enum | Excel Programming | |||
Enum | Excel Programming | |||
Enum in Excel 97 | Excel Programming | |||
Enum in Excel 97 | Excel Programming |