|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
- Sub text()
- Dim i%, j%, p$
- With Application.FileDialog(msoFileDialogFilePicker)
-
- If .Show Then
- p = .SelectedItems(1)
-
- Else
- Exit Sub
-
- End If
- End With
- i = ThisWorkbook.Sheets(1).Range("A65536").End(xlUp).Row
- Application.DisplayAlerts = False
- For j = 1 To i
- Set Wb = GetObject(p)
- Wb.SaveCopyAs ThisWorkbook.Path & "" & Range("A" & j).Value & "项目" & ".xlsx"
- Wb.Close False
- Next
- Application.DisplayAlerts = False
- End Sub
复制代码 这段代码要实现的功能是:以BBBBBBBBBB工作簿为模板进行 复制,用新建 Microsoft Excel 工作表A列数据对其进行重命名
|
|