PDA

View Full Version : visual basic help with loading text files?


Tom R
03-06-2009, 10:59 AM
I am in computing at the moment and have a system built in visual basic that calculates your carbon footprint and then saves it into a text file. It saves the words "Your carbon footprint is XXXX as of XX/XX/XX" It saves the file as a name that the user enters and then "carbonhistory.txt" at the end, so the result is e.g TomCarbonHistory.txt.

My load form allows the user to enter a name and then it takes the name to find the txt file, which it then needs to print into a text box in the form. I have tried some different methods but it either gives me problems with non-defined variables which the book I am working off did not explain, or it doesn't do anything at all with no errors.

I know this isnt exactly the perfect place to post, but people usually respond within minutes here whereas forums take a lot longer, and I am currently in lesson right now so could do with a bit of help.

Thanks.