VB
martin_tang
程序猴
展开
-
VB技巧—:简单的将保存的数值加密
只是在自己的项目中使用到了,所以在此整理Private Sub Command1_Click() Open "C:\aaa.txt" For Output As #1 Print #1, Encode(Text1.Text) Close #1 End Sub Private Function Encode(ByVal sCode As String) As String原创 2015-11-06 10:44:23 · 707 阅读 · 0 评论 -
VB错误处理机制
在sub中直接添加 On Error GoTo Err_1 xxxxxxx //这里存放容易出错的内容就可以了 xxxxxxx On Error GoTo 0原创 2015-10-22 10:36:43 · 913 阅读 · 0 评论 -
VB文档读写和数据库读写的相关总结
1.检查文档中文件夹是否存在,不存在就生成文件夹 if dir(“C:\ABC”) 文件存在 else 文件不存在 mkdir(“C:\ABC”) end if 2. 例如判断C:\Windows\System32\cmd.exe是否存在,如存在,就调用它 If Dir("C:\Windows\System32\cmd.exe")原创 2015-10-22 09:18:12 · 423 阅读 · 0 评论