Hi, all
I need hlep makeing a file using a input box?
Exp you Enter Your name as bob the file will be bob.pos
Printable View
Hi, all
I need hlep makeing a file using a input box?
Exp you Enter Your name as bob the file will be bob.pos
this is exactly what you asked for:
VB Code:
Private Sub Form_Load() Dim inpStr As String Dim ff As String inpStr = InputBox("Name") ff = FreeFile Open App.Path & "\" & inpStr & ".pos" For Output As #ff Print #ff, inpStr Close #ff End Sub
*Edit* Beat me to it. Mine was missing a part anways. I forgot to have the "\" to it.
a inputbox will not work it need to be text box.
same idea..
Private Sub Form_Load()
Dim ff As String
ff = FreeFile
Open App.Path & "\" & text1.text & ".pos" For Output As #ff
Print #ff, text1.text
Close #ff
End Sub
What good is the contents being the same as the name. You have to explain what you are trying to do if you want help. What is going to be IN the file.
Quote:
a inputbox
by the way, inputbox takes an and not a :D