3.1 编写sub过程 实例: Sub 建立10个表() If sheets.count>=10 then exit sub Sheets.add , sheets(sheets.count) , 1 Call 建立10个表 ‘过程递归 End sub Sub 选取统计() Dim msg as string Msg = “单元格个数:” & selection.count & chr(10) Msg = msg & “数字个数:” & worksheetfu
2.1 数据类型 数据类型 所占字节 Byte 1 Boolean 2 Integer 2 Long 4 Single 4 Double 8 Currency 8 Decimal 14 Date 8 Object 4 String 10 Variant 16 实例 Sub test() Dim sums as long, cell as range, I as integer, mystr as string For each cell in range(“A1:A10”) If vba.isn