![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 11
|
Sample code
Open "C:myfile.txt" For Output As #1 Len = 120 record = "Message1" Write #1, record record = "Message2" Write #1, record Is there a way of not having quotation marks in the file? |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Apr 2002
Posts: 112
|
Try the 'print' command instead of the 'write' command. Also, it's best to close your file.
Sub Print_Test() Dim record As String Open "C:myfile.txt" For Output As #1 record = "Message1" Print #1, record record = "Message2" Print #1, record Close #1 End Sub |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|