Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default 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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default 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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding text without erasing previous text? Adding Text Without Deleting Excel Discussion (Misc queries) 7 April 2nd 23 08:57 PM
Comparing text and then adding numbers if the text matches rotor11 Excel Worksheet Functions 2 April 8th 09 08:38 PM
Adding Dashes in front of text using text formating Neal Excel Discussion (Misc queries) 1 November 27th 06 10:58 PM
Can Text in an InputBox appear as asterisks? Chickyzee Excel Discussion (Misc queries) 0 January 16th 06 08:37 PM
Adding Data from EXCEL to a TEXT file jason Excel Programming 3 August 27th 03 02:46 AM


All times are GMT +1. The time now is 02:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"