• 0

[VB] File Save Bar


Question

Hello,

Im working in VB and Im trying to make a File tool bar (can make one) But I add Save to the File section, does anyone have the code that when they click save it will save a text box called Text1 (default)

Thanks

PJ :D

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

you mean save the contents of text1 to a file when the save button is pressed?

private sub SaveFile(TextBox as Control, FileName as string)

if len(trim(textbox.text)) = 0 then exit sub ' nothing to save

if filename = "" then exit sub ' no file name

open filename for output as #1

print #1, textbox.text

close #1

end sub

this is a very basic example...........

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.