![]() |
Adding text to a text file using an inputbox
Hello everyone,
I have an inputbox in VBScript, where the user inputs a location of a file. If possible I'd like the info they enter to be added to a text file. Any ideas? Thanks, proedrsmith *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Adding text to a text file using an inputbox
This is in VB script from an ASP page. You need windows scripting installed,
but you must have that to have posed the question. Dim fso, f,strfile strfile = "Path to your file here" Set fso = createobject("Scripting.FileSystemObject") set f = fso.opentextfile(strfile,8,true) f.writeline "Your text here from the text box" f.close -- Robin Hammond www.enhanceddatasystems.com Check out our XspandXL add-in "Proedrsmith" wrote in message ... Hello everyone, I have an inputbox in VBScript, where the user inputs a location of a file. If possible I'd like the info they enter to be added to a text file. Any ideas? Thanks, proedrsmith *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Adding text to a text file using an inputbox
http://support.microsoft.com/support...eio/fileio.asp
File Access with Visual Basic® for Applications Regards, Tom Ogilvy "Proedrsmith" wrote in message ... Hello everyone, I have an inputbox in VBScript, where the user inputs a location of a file. If possible I'd like the info they enter to be added to a text file. Any ideas? Thanks, proedrsmith *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Adding text to a text file using an inputbox
Sub AddText()
Dim S As String Dim i As Integer S = InputBox("Now what") If S < "" Then i = FreeFile Open "C:\Temp\MyLogg.txt" For Append As #i Print #i, S Close #i End If End Sub -- HTH. Best wishes Harald Excel MVP Followup to newsgroup only please "Proedrsmith" skrev i melding ... Hello everyone, I have an inputbox in VBScript, where the user inputs a location of a file. If possible I'd like the info they enter to be added to a text file. Any ideas? Thanks, proedrsmith *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
All times are GMT +1. The time now is 01:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com