Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to edit the following code but when I put the Select Case
after Then instead of after Else, it gives me an error. Why would it work for one but not the other? I'm a VBA beginner. If rngTopLeft.Value = "" Then .Interior.ColorIndex = 15 Else 'color blue/beige (37 for weekend, 40 for weekday) Select Case Weekday(rngTopLeft.Value) Case 1, 7 'Sunday or saturday .Interior.ColorIndex = 37 Case Else .Interior.ColorIndex = 40 End Select End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select Case Statement | Excel Worksheet Functions | |||
select case statement | Excel Programming | |||
Select Case Statement does not evaluate | Excel Programming | |||
Convert If..Else to Select Case Statement. | Excel Programming | |||
Data validation with the Select Case statement | Excel Programming |