Nested if statements in select case statements (1 Viewer)

Mcgrco

Registered User.
Local time
Today, 15:57
Joined
Jun 19, 2001
Messages
118
Probably an easy one but I can get this code to work. The nested if statements are causing the select case problems. When it gets to case 1 it does reckonise the select case statement. It throws the error "Case without Select Case". Can anyone show me where Im going wrong


Select Case intKey

Case 0
If numPosAmount = 0 Then
numRunningAsjustment = 0
Else
If numNominalamounts < SumTradesTotal Then
numRunningAsjustment = numNominalamounts * -1
numPosAmount = numPosAmount + numRunningAsjustment
Else
If numPosAmount <= numNominalamounts Then
numRunningAsjustment = numNominalamounts * -1
numPosAmount = numPosAmount + numRunningAsjustment
End If
Case 1
 
R

Rich

Guest
There aren't enough End Ifs to start with, and you might try
Select Case Val(MyField)
 

Mcgrco

Registered User.
Local time
Today, 15:57
Joined
Jun 19, 2001
Messages
118
Supid is as stupid does.

A clear case of not seeing the wood fro the trees. Cheers.
 

Users who are viewing this thread

Top Bottom