VBA

Tutorial: https://www.tutorialspoint.com/vba/vba_text_files.htm
MSDN: https://msdn.microsoft.com/en-us/vba/excel-vba/articles/worksheet-querytables-property-excel

Module

Procedure

The two main types of Procedures are Sub and Function.

function

sub-rpocedures

定义变量:
Dim <> As <>
定义常量:
 Const <> As <> = <>

numeric变量类型:Byte Integer Long Single Double Currency Decimal
non-numeric变量:String Date Boolean Object Variant
msg中的换行:Chr(10)

QueryTable : Worksheet表,数据源来自于Worksheet之外

VBA Trim()

Sub Macro1()
Dim WrdArray() As String
Dim text_string As String
text_string = "2015/2/12"
WrdArray() = Split(text_string, "/")
For i = LBound(WrdArray) To UBound(WrdArray)
  strg = strg & vbNewLine & "Part No. " & i & " - " & WrdArray(i)
Next i
MsgBox strg
End Sub

你可能感兴趣的:(VBA)