Creating a text file

mtheriault2000

Well-known Member
Joined
Oct 23, 2008
Messages
826
Hello

I need to save a string to a text file. How can I create a file

The path and name is : Entries = "C:\BracketTrader\Signals"

Martin
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
You didn't give many details, so here is a basic example:

Code:
Sub test()
Open "C:\BracketTrader\Signals.txt" For Output As #1
    Print #1, "Test String"
Close #1
End Sub
 
Upvote 0
Thanks HotPepper

sorry for no detail, I was absorbed by my problem.
My need is to creta a file that will contained one string, Your example should be ok.

I will give it a try later when back home.

Martin
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,710
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top