|
-
May 31st, 2006, 08:56 PM
#1
Thread Starter
Member
[RESOLVED] Help creating Text Files using VBA Excel
I am trying to figure out a way to create a simple text file from excel (using VBA). The code below comes close but with a hitch. The stext string seems to need the quotations which presents a problem.
I would like an example of VBA code that can create a text file and pass a string without quotations.
Dim sFile As String
Dim sText As String
Dim iFileNum As Integer
sFile = "C:\(path)\Textfile.txt"
sText = "myString"
iFileNum = FreeFile
Open sFile For Output As iFileNum
Write #iFileNum, sText
Close #iFileNum
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|