|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Writing to a text file
Can any one tell how to write texts to textfiles (notepad), using API or anyway.... please
|
|
#2
|
|||
|
|||
|
RE: Writing to a text file
Hello Arjun,
Look in Help for more information about OPEN, CLOSE, PRINT # and WRITE # Statements. Below is the sample code. '------------------------------------------------------ Open "c:\test.txt" For Output As #1 ' Open file for output. Write #1, "Hello World", 234 ' Write comma-delimited data. Write #1, ' Write blank line. Close #1 ' close file '------------------------------------------------------ |
|
#3
|
|||
|
|||
|
Hi JamesLe,
Thank You so much.. Actually i dont have MSDN help, where i can get the help for these syntaxes like, #1, output etc... How to specify append mode write mode, read only ....? Arjun.... |
|
#4
|
|||
|
|||
|
http://msdn.microsoft.com/library
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#5
|
|||
|
|||
|
Thanx
hi Doug G!
thanx.. |
|
#6
|
|||
|
|||
|
Hi, here's a sample of my code. It seemed to work for me.
While Not EOF(1) Line Input #1, Eachline splitline = Split(Eachline, Chr(9)) For i = 0 To UBound(splitline) x = i + 1 mtt(x, y) = Val(splitline(i)) Next y = y + 1 Wend |
|
#7
|
|||
|
|||
|
Whats wrong in my code
Hi!
any one tell what is wrong in this code..? Private Sub Command1_Click() Dim mtt() As String Open "c:\test2.txt" For Input As #1 ' Open file for output. While Not EOF(1) Line Input #1, Eachline splitline = Split(Eachline, Chr(9)) For i = 0 To UBound(splitline) x = i + 1 mtt(x, y) = Val(splitline(i)) Next y = y + 1 Wend Close #1 ' close file MsgBox mtt(0, 0) End Sub |
|
#8
|
|||
|
|||
|
RE: Declaring an Array
Hello Arjun,
Look like you have a problem with your array declaration. If it is a dynamic array then you need to add ReDim statement to specify the array size at runtime. Look in help for more info about Dim and ReDim statement and Preserve keyword. Hope it helps. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Writing to a text file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|