View Single Post
Old 19-06-2012, 05:54 PM   #4
nguyenducdktd13
Nhập môn đệ tử
 
Tham gia ngày: Aug 2011
Bài gửi: 7
:
tạo một dao diện có textbox1, 2, 3 , 4, nút command1, command2 rồi dùng code này"'Ky su tu dong hoa Nguyen Van Duc
'Phone 0975553791
'chuong trinh tao file txt luu ket qua
'-----------------------------------------------------------------------
Dim savefile As Long
Private Sub Command1_Click()
savefile = FreeFile
Index = Text1.Text
nameofthefile = Text2.Text
Path = Text3.Text
On Error GoTo error
Open ("" + "C:\" + "" + (nameofthefile) + ".txt") For Output As #savefile 'neu thay "C:\"=(path) thi cai cho do lam duong dan
Print #savefile, Index
Close #savefile
Exit Sub
error:
MsgBox " clgthe"
End Sub

Private Sub Command2_Click()
Dim contenfile As String
Open "C:\file.txt" For Input As #1
Input #1, contenfile
Text4.Text = contenfile
Close #1
End Sub" -->kết quả nhìn trong ổ C sẽ hiểu, luu và lấy dữ liệu từ file text.
nguyenducdktd13 vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn