Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read In A Flat File
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00568718
Message ID:
00568930
Views:
15
Hi,
Use "Line Input" instead of "Get":
    Dim sString As String
    Open "c:\myfile.ini" For Input As #1
    While Not EOF(1)
      Line Input #1, sString
      ' Other commands go here
    Wend
You can also use API functions like GetPrivateProfileString() to read info from INI files.

HTH,
Alex

>I'm trying to read in an INI file. I have:
>
>Open "c:\myfile.ini" For Input As #1
>
>While Not EOF(1)
>
>  Get #1, , sString
>
>  ' Other commands go here
>
>Wend
>

>
>I get a 'Bad File Mode' error on the GET line. Can anyone help
>please?
Previous
Reply
Map
View

Click here to load this message in the networking platform