This one has stumped me, I am using a select statement to check a string variable.
I keep getting the error "Expecting 'Case','Default' or 'End Select'. But as you can see I have all three in the code???
Thanks Luna.
I keep getting the error "Expecting 'Case','Default' or 'End Select'. But as you can see I have all three in the code???
Function ReadCTA(file$) ; ; Name$ ; Added in the CheckCTA() Function ; SpoolCPC$ ; ReadLine and find "(STLNUMMER=" value is 8 characters from this point. ; SpoolDIR$ ; ReadLine and find "## " Directory is the rest of the line, trim trailing spaces. ; SpoolNO$ ; ReadLine and find "(MSECTION=" value is from this point and closing ")" after. ; FoundFile=ReadFile(Folder$+""+file$) While Not Eof(FoundFile) GotLine$=ReadLine(FoundFile) Select GotLine$ Case Instr(GotLine$,"(STLNUMMER=",1)>0 cta.SpoolCPC$=Mid$(GotLine$,Instr(GotLine$,"(STLNUMMER=",1)+12,8) Case Instr(GotLine$,"## ",1)>0 cta.SpoolDIR$=Mid$(GotLine$,Instr(GotLine$,"## ",1)+4,Len(GotLine$)-3) Case Instr(GotLine$,"(MSECTION=",1)>0 cta.SpoolDIR$=Mid$(GotLine$,Instr(GotLine$,"(MSECTION=",1)+11,Len(GotLine$)-10) Default End Select Wend CloseFile(FoundFile) End Function
Thanks Luna.