Sub test()
Dim a, b, c, FileList
a = Array("A")
b = Array("A", "B")
c = Array("C:\xxx.nmon")
FileList = Application.GetOpenFilename("NMON Files(*.csv;*.nmon),*.csv;*.nmon", 1, "Select NMON file(s) to be processed", , True)
MsgBox UBound(a)
MsgBox UBound(b)
MsgBox UBound(c)
MsgBox UBound(FileList)
End Sub
以上代码分贝得到
0
1
0
1
FileList = Application.GetOpenFilename("NMON Files(*.csv;*.nmon),*.csv;*.nmon", 1, "Select NMON file(s) to be processed", , True)我只选择了一个文件,那应该c = Array("C:\xxx.nmon")是一样得,为什么UBound()得出来的一个是0,一个是1.