LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default End Select without Select Case, Block If without End If errors

I am trying to implement the function below (good computer scientists will
know why =)). However I keep getting the following errors:

"End Select without Select Case"

If I try moving the tabs around, I sometimes get the following error:

"Block If without End If"

However, these error messages don't seem to make sense as everything is
closed. How can I fix this?

Thanks
Atreides


=========
Function ConwaysStepCell(neighbours, current, newLife, liveMin, liveMax)
Select Case current
Case 0
If neighbours = newLife Then
ConwaysStepCell = 1
Else
ConwaysStepCell = 0
End If
Case 1
If neighbours < liveMin Then
ConwaysStepCell = 0
If neighbours liveMax Then
ConwaysStepCell = 0
Else
ConwaysStepCell = 1
End If
End Select
End Function
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
Why Error Message "End Select without Select Case"? GoFigure[_13_] Excel Programming 5 December 9th 05 12:26 AM
Select Case help Ramthebuffs[_14_] Excel Programming 4 October 13th 05 12:41 AM
how select block w/unknown last col and last row? Nikos Yannacopoulos[_5_] Excel Programming 0 November 19th 03 10:33 AM


All times are GMT +1. The time now is 09:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"