View Single Post
  #5 (permalink)  
Old December 31st, 2011, 03:21 PM
Gary108 Gary108 is offline
Authorized User
Points: 193, Level: 3
Points: 193, Level: 3 Points: 193, Level: 3 Points: 193, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2011
Posts: 31
Thanks: 6
Thanked 0 Times in 0 Posts

Dear Rob,

Thank you for your patience with me and your ongoing help. With your last explanation I was able to successfully make my application do what it was supposed to do. There is just one thing that still confusions me. With the code below, I am able to successfully write the contents of the three text boxes below to a file named with whatever string is held in the variable, strSaveAs.

Dim stream_writer As StreamWriter
stream_writer = System.IO.File.AppendText("c:\WaterWriter\" & (strSaveAs) & ".txt")

What I do not understand is why I cannot write the text to a subdirectory of "C:\WaterWriter\" such as "C:\WaterWriter\Library\". When I try to I get an error message saying "Could not find a part of the path 'c:\WaterWriter\Library\Text.txt'. I have tried this with several different sets of directories and subdirectories and every time, if I go down to the second level directory I get that message. Can you give any insight on this matter?

Thank you again,

Reply With Quote