随笔分类 -  VB

EDI中常用的把金额中的小数点去掉,然后补足位数.
摘要://其实就是EDI中的一种文件加密,美国老经常用的,这东西其实特烦人.,呵呵~~//这是其中的一个函数,去点.....//StrPut为要去点的字串//M为要保留的字串位数Public Function FPoint(StrPut As String, M As Integer) As String Dim I As Integer Dim J As Integer Dim K ... 阅读全文
posted @ 2006-10-21 17:15 mico 阅读(249) 评论(0) 推荐(0)
让文件框中只能输入有效数字.
摘要:'把以下代码放入一个模块中,然后直接调用就可以啦!好好用哦~~~呵呵~~Option Explicit 'Option Explicit 'skip_vbuilder Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long)... 阅读全文
posted @ 2006-10-21 17:09 mico 阅读(166) 评论(0) 推荐(0)
从Recordset导出到Excel
摘要:Public Function ExportExcel(Rex As ADODB.Recordset _, Com As CommonDialog, i_Change As Integer) As Boolean Dim ColCount, I, K As Integer, J As Integer, M As Integer Dim xlApp As New Excel.Appli... 阅读全文
posted @ 2006-10-21 17:07 mico 阅读(785) 评论(0) 推荐(0)
把数据表导出到文本文件(TXT)
摘要:Public Function ExportTXT(rFile As ADODB.Recordset, Dia As CommonDialog) As Boolean Dim strInput As String Dim I As Integer Dim StrFile As String On Error GoTo ErrHandler strInput = "" ... 阅读全文
posted @ 2006-10-21 17:03 mico 阅读(299) 评论(0) 推荐(0)
VB进行有效数字的判断
摘要:'判断方法如下:'1、肯定出现在0-9,点号(46),负号(45)之内'2 ?负号必须出现在行首'3、点号只允许出现一次,如果在最前面出现,在最前面补0,如果在最后面出现,在后面补0 'CHR是ASC的逆函数? '在VB中按CTRL G '然后再在焦点窗口中输入'Print Asc(".")Public Function IsDecimal(ByVal strValue As String) As... 阅读全文
posted @ 2006-10-21 17:01 mico 阅读(1865) 评论(0) 推荐(0)