Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Case Select & If....Then!

Status
Not open for further replies.

davefish

Technical User
Jul 26, 2002
169
GB
Can anyone tell me whether it's possible to run an If...Then statement within a case select function. I have a number of dependant variables that require processing in order. The first value of a single variable, is broken down via a case select statement. Each case will then have an if..AND (conjunction)..Then goto simialar to:-

Select Case Charge_rate

Case 1 to 30

If MySettings.Charge = 100 AND MySettings.Trip = 24 Then goto ........

Case 30 to 40


I get error messages every time I run. HELLP!

DaveFish
 
you dont have an End if in the coding you submitted, this might be why

Thanks Rob.[yoda]
 
Hi Rob,

Sorry, the last set of comma's ..... were to truncate my code. The problem I had was if the If statement was single line, no End If is required. I tried Block statements as well, but kept getting Errors... 'Block If with no End if...' I must have tried every combination but to no avail. ANy clues???


DaveFish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top