I'm reading lines in a text file and using the values. I am reading one value on one line, and two values on another line. I'm a little confused on how the code should look.
Should it look like this?
------------------------------------------------------------
Select Case LineNumber
Case 31
value1 = Mid(LineString, 72, 7)
var1 = CSng(value1)
Case 54
value2 = Mid(LineString, 111, 6)
var2 = CSng(value2)
Case 54
value3 = Mid(LineString, 127, 5)
var3 = CSng(value3)
End Select
------------------------------------------------------------
Or is it this?
------------------------------------------------------------
Select Case LineNumber
Case 31
value1 = Mid(LineString, 72, 7)
var1 = CSng(value1)
Case 54
value2 = Mid(LineString, 111, 6)
var2 = CSng(value2)
'the 2nd Case 54 is removed
value3 = Mid(LineString, 127, 5)
var3 = CSng(value3)
End Select
------------------------------------------------------------
Thanks.
pds
Should it look like this?
------------------------------------------------------------
Select Case LineNumber
Case 31
value1 = Mid(LineString, 72, 7)
var1 = CSng(value1)
Case 54
value2 = Mid(LineString, 111, 6)
var2 = CSng(value2)
Case 54
value3 = Mid(LineString, 127, 5)
var3 = CSng(value3)
End Select
------------------------------------------------------------
Or is it this?
------------------------------------------------------------
Select Case LineNumber
Case 31
value1 = Mid(LineString, 72, 7)
var1 = CSng(value1)
Case 54
value2 = Mid(LineString, 111, 6)
var2 = CSng(value2)
'the 2nd Case 54 is removed
value3 = Mid(LineString, 127, 5)
var3 = CSng(value3)
End Select
------------------------------------------------------------
Thanks.
pds