Select case Zero (1 Viewer)

arage

Registered User.
Local time
Today, 07:44
Joined
Dec 30, 2000
Messages
537
Select case Zero
I’m using a select case statement & am using zero as one of the values like so.

Select Case glblDirCode
Case 1000, 0

Now when this zero case happens, the code does not continue and execute the statements but causes an error whereby the calling procedures error handler is activated. Could someone please advise why zero would be causing such a problem?
 

Drevlin

Data Demon
Local time
Today, 07:44
Joined
Jul 16, 2002
Messages
135
What type is glblDirCode?
Have you checked to see exactly what is passed to glblDirCode when you believe it should be 0 (i.e. Toggle a breakpoint and hold your cursor over the word glblDirCode)?
It's hard to pinpoint anything difinitive from your description so far.
I would suggest commenting out the Error Handler and seeing what shows up.

Peace
 

arage

Registered User.
Local time
Today, 07:44
Joined
Dec 30, 2000
Messages
537
fixed

Never mind I fixed the problem, I was setting a combo boxes list index property before adding items to the control, so ofcourse it would error out. I changed the order & it’s working now.
 

Users who are viewing this thread

Top Bottom