Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get the following error, "Next without For". How do I change my code to
fix it? 'Format Colums which are John For a = 4 To 31 If Cells(a, 1).Value = "John" Then For b = 2 To 32 If Cells(2, b).Value = "Fri" Then Cells(a, b).Select With Selection.Interior .ColorIndex = 0 .Pattern = xlGray8 .PatternColorIndex = xlAutomatic End With Next b End If Next a MsgBox "Formatting Complete" Exit Sub Error: Exit Sub End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
Counting instances of found text (Excel error? Or user error?) | Excel Worksheet Functions | |||
Automation Error, Unknown Error. Error value - 440 | Excel Programming | |||
Error 50290: Error writing to Worksheet while using an ActiveX Control | Excel Programming |