Reading a flat file

garyd1234

Board Regular
Joined
Apr 17, 2003
Messages
103
Hi,
I am writing a program whereby information is written to a flat file one line at a time. Then I stay in my VB program and read that flip file back into list boxes if the user wants to see what it wrote out there into the flatfile. Well, if I stay in the program (don't exit) the line that I just wrote out there (which is in the flat file) won;t show up in my list boxes. If I exit the program and get back in and press the button, it shows up. All I am doing is
open "filename" for input as #1
while not eof(1)
input #1, x
input #1, y
etc
wend
close

Likewise I am using a similar open and close to write it out. I've never had this before. Why won't if read back the last record I wrote out unless I exit the program and get back in?

Perplexing???
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,221,579
Messages
6,160,615
Members
451,658
Latest member
NghiVmexgdhh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top