View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default If - End if problem

On Fri, 14 Dec 2007 13:34:05 -0800, Papa Jonah
wrote:

What is wrong with this?
If locale = "P" Then Selection.Interior.ColorIndex = 3 Else: If locale = "L"
Then _
Selection.Interior.ColorIndex = 6 Else: Selection.Interior.ColorIndex = 9
End If

I keep getting an End If without If block error. I don't understand the help.
I have an If statement and and End If statement.

Papa J



Is this code perhaps embedded inside a "With" block that does not have an End
With? You will get that same error message under that circumstance.
--ron