VB6 Quotes appearing whenever you open the app -


i have vb6 program saves text in text box file, , when open again, same text there, whenever re-open textbox text has quotes around it, how might remove quotes? code is:

private sub form_load() on error goto nofile randomize  dim sfile string dim blank string dim c1path string dim ifilenum integer  sfile = "c:\jpldata"  ifilenum = freefile open sfile input ifilenum  line input #ifilenum, c1path close #ifilenum text1.text = c1path  nofile: if err.number = 5 sfile = "c:\jpldata" c1path = "no custom defined."  ifilenum = freefile open sfile output ifilenum write #ifilenum, text1.text close #ifilenum end if   end sub  private sub form_queryunload(cancel integer, unloadmode integer) dim sfile string dim cname string dim ifilenum integer  sfile = "c:\jpldata" cname = vbclrf & text1.text & vbclrf  ifilenum = freefile open sfile output ifilenum write #ifilenum, cname close #ifilenum  end sub 

edit: i've answered own problem, spelled vbcrlf wrong, , foorgot add in blsnk variable handle quotes :p

the documentation says data written using write # statement read using input # statement.

also: data writen using print # statement read using line input # statement.

you're mixing write # line input #, hence inconsistency.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -