| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 545 人关注过本帖
标题:[求助]谁能给着段代码写个注释啊
取消只看楼主 加入收藏
seguiwo
Rank: 1
等 级:新手上路
帖 子:76
专家分:0
注 册:2007-4-11
收藏
 问题点数:0 回复次数:2 
[求助]谁能给着段代码写个注释啊
Private Sub Command3_Click()
Dim Timenow As String
Dim Sfilename As String
Dim Dfilename As String
Timenow = Year(Now) & Month(Now) & Day(Now) & Hour(Now) & Minute(Now) & Second(Now)
If Level <> 1 Then
MsgBox "你没有操作权限", 0, "注意"
Exit Sub
End If
CommonDialog1.DialogTitle = "请选择备份路径:"
CommonDialog1.Filename = Timenow & "(Backup).mdb"
CommonDialog1.Filter = "*.mdb(Access数据库)|*.mdb"
CommonDialog1.ShowSave
If CommonDialog1.Filename = "" Then Exit Sub
Dfilename = CommonDialog1.Filename
Sfilename = Thispath & "DataBase.mdb"
'读取数据库文件并在新的路径写入
Dim Filenum As Integer
Dim Filenum2 As Integer
Dim i As Integer
Dim n As Long
Dim Leftsize As Long
Dim cells() As Byte
Filenum = FreeFile
Open Sfilename For Binary As Filenum
ProBar.Visible = True
ProBar.Min = 0
ProBar.Max = LOF(Filenum)
n = LOF(Filenum) / 1024
Leftsize = LOF(Filenum) Mod 1024&
Filenum2 = FreeFile
Open Dfilename For Binary As Filenum2
ReDim cells(1024)
For i = 1 To n
Get Filenum, , cells
Put Filenum2, , cells
On Error Resume Next
ProBar.value = ProBar.value + 1024&
DoEvents
Next
If Left > 0 Then
ReDim cells(Left)
Get Filenum, , cells
Put Filenum2, , cells
On Error Resume Next
ProBar.value = ProBar.value + Leftsize&
End If
Close
ProBar.Visible = False
MsgBox "备份完成!", 0, "报告"
End Sub
搜索更多相关主题的帖子: 注释 代码 
2007-06-29 10:01
seguiwo
Rank: 1
等 级:新手上路
帖 子:76
专家分:0
注 册:2007-4-11
收藏
得分:0 
谢谢大家了

2007-06-29 10:02
seguiwo
Rank: 1
等 级:新手上路
帖 子:76
专家分:0
注 册:2007-4-11
收藏
得分:0 

谢谢楼上的大哥
小弟万分感谢!!!!


2007-06-29 17:11
快速回复:[求助]谁能给着段代码写个注释啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.029200 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved