|
 |
- - - - - - - - - - - - - - ผู้ให้การสนับสนุน- - - - - - - - - - - - - -
|
|
 |
กระทู้ #2164 [Vb] (จาก IP: 124.121.196.199)
ไครทำ SaveAs ข้อความ ในTextbox เป็น File ได้มั่งขอ Code มั่ง
ไครทำ SaveAs ข้อความ ในTextbox เป็น File ได้มั่งขอ Code มั่งครับ
ผมอายุ15เองงับ น่ะๆๆ อยากศึกษา
|
จากคุณ
:
ณฐพล / TBC_DoNutZa@hotmail.com [2008-07-18 14:01:52]
|
|
ความคิดเห็น #26949 (จาก IP: 58.8.182.165)
Public Function SaveTextToFile(FileFullPath As String, _ sText As String, Optional Overwrite As Boolean = False) As _ Boolean 'Purpose: Save Text to a file 'Parameters: '-- FileFullPath - Directory/FileName to save file to '-- sText - Text to write to file '-- Overwrite (optional): If true, if the file exists, it 'is overwritten. If false, 'contents are appended to file 'if the file exists
'Returns: True if successful, false otherwise
'Example: 'SaveTextToFile "C:\My Documents\MyFile.txt", "Hello There"
On Error GoTo ErrorHandler Dim iFileNumber As Integer iFileNumber = FreeFile
If Overwrite Then Open FileFullPath For Output As #iFileNumber Else Open FileFullPath For Append As #iFileNumber End If
Print #iFileNumber, sText SaveTextToFile = True
ErrorHandler: Close #iFileNumber End Function
|
จากคุณ
:
sup98 [2008-07-18 18:43:08]
|
 |
|
- - - - - - - - - - - - - - ผู้ให้การสนับสนุน- - - - - - - - - - - - - -
|
|
|
|
|