易截截图软件、单文件、免安装、纯绿色、仅160KB

VB: 一个正则提取功能

'引用:Microfoft VBScript Regular Expressions 5.5 '一个正则提取功能
Public Function regGetStr_three(ByVal myString As String, ByVal patReg As String) As String()
   Dim objRegExp As RegExp
   Dim objMatch As Match
   Dim colMatches   As MatchCollection
   Dim RetStr As String
   Dim y() As String, j As Integer
   ReDim y(0)
   Set objRegExp = New RegExp
'   objRegExp.Pattern = "a\[\d{1,3}\]=""?(.{1,})""?\.split"
   objRegExp.Pattern = patReg
   objRegExp.IgnoreCase = True
   objRegExp.Global = True    j = -1
   If (objRegExp.Test(myString) = True) Then
    Set colMatches = objRegExp.Execute(myString)
    For Each objMatch In colMatches
     j = j + 1
     ReDim Preserve y(j)
     y(j) = objMatch.SubMatches(0) + "," + objMatch.SubMatches(1) + "," + objMatch.SubMatches(2)
    Next
   Else
    RetStr = "String Matching Failed"
   End If
   regGetStr_three = y End Function


相关文档:

VB用COM口发WAPPUSH,返回+CMS ERROR: 500

 给出代码如下:
Type WAPPushPDUStruct
    SMSCLen As String
    SMSCType As String
    SMSC As String
    PROTOCOL As String
    TPMRBase As String
    RePhoneNumLen As String
    ReP ......

vb 模拟鼠标按键

 把鼠标移到屏幕指定位置 如(111.111) 单击一下
再移到屏幕另一指定位置指定位置 如(222.222)单击一下
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Private Declare Function SetCursorPo ......

vb调用excel方法大全

在VB中要想调用Excel,需要打开VB编程环境“工程”菜单中的“引用”项目,并选取项目中的“Microsoft Excel 11.0 object library”项。由于你的Excel版本不同,所以这个选项的版本号也是不同的。
    因为EXCEL是以层次结构组织对象的,其对象模型中含有许多不同的对象元素。
&n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号