View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Compile error "Else without if"

Hi

Without seeing the rest of the code I have no idea if the code works but
this should make it compile

If CheckMilo Then
Cells(NextRow, 8) = "2"
Else
Cells(NextRow, 8) = ""
End If

Mike

"Morlin" wrote:

Help.

I had a userform that I can fill out and then save to a spreadsheet.
Then I can Look up the information and have it put back into a
spreadsheet. To make changes. Then it is necessary to save the
changes again.

If CheckMilo Then Cells(NextRow, 8) = "2"
Else
Cells(NextRow, 8) = ""
End If

this is one of about 25-30 check boxes I need to be able to affect. I
get an error Compile error "else without if" could somebody tell me
how to right it so I don't get the error.