7,785
社区成员




Private Sub CommandButton1_Click()
Dim fldr As FileDialog
Set fldr = Application.FileDialog(msoFileDialogFilePicker)
Dim vSItem As Variant
With fldr
If .Show = -1 Then
For Each vSItem In .SelectedItems
With GetObject(CreateObject("Scripting.FileSystemObject").GetFileName(vSItem))
crr = .Sheets(1).UsedRange '把每个单元格中的数据一次性次放入一个数组
.Close (False)
End With
Next vSItem
Else
End If
End With
Set fd = Nothing
End Sub
Sub test()
Dim ww, a
ww = Range("a1:a16")
a = Application.WorksheetFunction.Transpose(ww)
Debug.Print UBound(a), Join(a, "*")
End Sub