数据类型 VBA提供了15种标准数据类型,具体见下表: 变量 Sub 变量学习() 'Dim 变量名 As 数据类型 Dim str1 As String '声明定长的String变量 '使用变量类型声明符 Dim str3$ '声明多个变量 Dim Str As String, nu As Integer '如果不指明变量类型,默认为Variant Dim Str End Sub 数据类型 类型声明符 Integer % Long & Single ! Double # Currency @…
之前没有理解好,还以为是学习笔记有谬误. 'VBA正则笔记 肯定环视 Public Sub RegExHandle() Dim Regex As Object Dim Mh As Object, OneMh As Object Dim Text As String Text = "Halo world!" Set Regex = CreateObject("VBScript.RegExp") With Regex .Global = True '.MultiLine…