没有合适的资源?快使用搜索试试~ 我知道了~
连续复制,自动存档的小程序
需积分: 10 1 下载量 37 浏览量
2013-06-07
19:45:31
上传
评论
收藏 2KB TXT 举报
温馨提示
试读
3页
连续复制,自动存档,方便平时收集资料时自动存档,特别是在连续复制时
资源推荐
资源详情
资源评论
Option Explicit
Public aaa As String
Public chang As Boolean
Private Sub Command1_Click()
Open "c:\windows\desktop\rgtxt.txt" For Append Access Write As #1
Print #1, Text1.Text
Text1 = ""
Close #1
chang = False
End Sub
Private Sub Command2_Click()
Open "c:\windows\desktop\rgtxt.txt" For Input As #1
Dim aaa, bbb As String
Do While Not EOF(1)
Input #1, aaa
bbb = bbb & aaa & vbCrLf
Loop
Text1.Text = bbb
Close #1
End Sub
Private Sub Command3_Click()
Dim zzz As String
If chang = True Then
zzz = MsgBox("文件已被改变,是否保存?", vbYesNoCancel + vbDefaultButton3 + vbInformation, "提示信息")
If zzz = vbYes Then
Open "c:\windows\desktop\rgtxt.txt" For Append Access Write As #1
Print #1, Text1.Text
Close #1
End
ElseIf zzz = vbNo Then
Public aaa As String
Public chang As Boolean
Private Sub Command1_Click()
Open "c:\windows\desktop\rgtxt.txt" For Append Access Write As #1
Print #1, Text1.Text
Text1 = ""
Close #1
chang = False
End Sub
Private Sub Command2_Click()
Open "c:\windows\desktop\rgtxt.txt" For Input As #1
Dim aaa, bbb As String
Do While Not EOF(1)
Input #1, aaa
bbb = bbb & aaa & vbCrLf
Loop
Text1.Text = bbb
Close #1
End Sub
Private Sub Command3_Click()
Dim zzz As String
If chang = True Then
zzz = MsgBox("文件已被改变,是否保存?", vbYesNoCancel + vbDefaultButton3 + vbInformation, "提示信息")
If zzz = vbYes Then
Open "c:\windows\desktop\rgtxt.txt" For Append Access Write As #1
Print #1, Text1.Text
Close #1
End
ElseIf zzz = vbNo Then
资源评论
COLINrg
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功