Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry to be a bit slow replying. I got a bit side tracked with another
project. Thanks very much for your assistance. I now have all the code working fine. -- AJM1949 "urkec" wrote: (1) Sub SaveCellToTXT() Set fso = CreateObject _ ("Scripting.FileSystemObject") Set txtFile = fso.CreateTextFile _ ("C:\test1.txt", True) txtFile.WriteLine _ ActiveWorkbook.Sheets(1).Cells(1, 1) txtFile.Close End Sub (2) Sub SaveTextBoxToTXT() Set fso = CreateObject _ ("Scripting.FileSystemObject") Set txtFile = fso.CreateTextFile _ ("C:\test2.txt", True) 'UserForm1.TextBox1.Value = "test" txtFile.WriteLine _ UserForm1.TextBox1.Value txtFile.Close End Sub Hope that helps. -- urkec "AJM1949" wrote: How can I store a value in a text file from (1) a cell reference (2) a text box on a form? Thanks in advance for your help -- AJM1949 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel (xls) files spontaneously converting to text files | Excel Discussion (Misc queries) | |||
how do i convert text files into CSV files? | Excel Discussion (Misc queries) | |||
Macro to open *.dat files and save as .txt (comma delimited text files) | Excel Programming | |||
copy subfolders, replace text in files and save files in copied subfolders | Excel Programming | |||
open some txt files ,find text , copy the text before that to a single cell | Excel Programming |