|
- Sub J0r()
- Dim a, i%, j%
- With Application.FileDialog(msoFileDialogFilePicker)
- .AllowMultiSelect = True
- .Filters.Clear
- .Filters.Add "VBA bas files", "*.bas"
- .InitialFileName = ThisWorkbook.Path
- If .Show Then
- ReDim a(1 To .SelectedItems.Count)
- For i = 1 To .SelectedItems.Count
- a(i) = .SelectedItems(i)
- Next
- Else
- Exit Sub
- End If
- End With
- j = Application.VBE.ActiveVBProject.VBComponents.Count
- With Application.VBE.ActiveVBProject.VBComponents
- For i = 1 To UBound(a)
- .Import a(i)
- j = j + 1
- .Parent.VBComponents(j).Name = Split(Mid(a(i), InStrRev(a(i), "") + 1), ".")(0)
- Next
- End With
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|