shg,
I am not much of a programer. how do you run the program in
http://www.excelforum.com/excel-prog...le-string.html
Thanks again
shg,
I am not much of a programer. how do you run the program in
http://www.excelforum.com/excel-prog...le-string.html
Thanks again
Adding a Macro to a Code Module![]()
Sub TextOut() Const sFile As String = "C:\YourPath\YourFileName.txt" ' change as required Dim cell As Range Dim iFF As Integer Dim s As String For Each cell In Selection s = s & cell.Value & "," Next cell s = Left(s, Len(s) - 1) iFF = FreeFile Open sFile For Output As #iFF Print #iFF, s; Close #iFF End Sub
1. Copy the code from the post
2. Press Alt+F11 to open the Visual Basic Editor (VBE)
3. From the menu bar in the VBE window, do Insert > Module
4. Paste the code in the window that opens
5. Edit the sFile string to be the correct path
6. Close the VBE to return to Excel
Then ...
Select the cells you want to output to the file
Do Alt+F8 and run macro TextOut
Entia non sunt multiplicanda sine necessitate
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks