|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
看看这样行不行?- '引用 Office库
- Sub Link_EXCEL()
- Dim fld As FileDialog
- Dim i As Long
- Dim lngL As Long
- Dim strL As String
- Set fld = Application.FileDialog(msoFileDialogFilePicker)
- If fld.Show = -1 Then
- For i = 1 To fld.SelectedItems.Count
- lngL = InStrRev(fld.SelectedItems(i), "", -1)
- strL = Mid(fld.SelectedItems(i), lngL + 1, Len(fld.SelectedItems(i)))
- DoCmd.TransferSpreadsheet acLink, acSpreadsheetTypeExcel9, Mid(strL, 1, Len(strL) - 4), fld.SelectedItems(i), True
- Next
- End If
- End Sub
复制代码 |
|