ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Output to Notepad (https://www.excelbanter.com/excel-programming/287669-output-notepad.html)

Neil[_14_]

Output to Notepad
 
I have some inputboxes prompting the user for certain
values. I would like these values to be saved in a text
file. Is there some way this can be done?

KJTFS[_21_]

Output to Notepad
 
Dim myCriteria As String
Dim myOutText As String
Dim tmpfileName As String


tmpfileName = "C:\Program Files\YourFile.txt"
'Open tmpfileName For Output As #1 - to clear and start fresh
Open tmpfileName For Append Access Write As #1
myOutText = "What ever..."
Write #1, myOutText
Close #1

That is what I have used in the past.

Keith
www.kjtfs.com


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 11:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com