Sub 按列批量插图() '按指定列的内容插入同名图片对应到右边列,图片大小自动适应单元格大小' On Error GoTo aa a = ActiveCell.Column '活动的列' b = a + 1 '活动列的右边一列' D = ActiveSheet.Cells(65536, a).End(xlUp).Row '最后一行 '跳出选择文件夹对话框 Set fd = Application.FileDialog(msoFileDialogFolderPicker) With fd If
Sub mysearch() Dim fs, i, arr(1 To 10000) Set fs = Application.FileSearch '设置一个搜索对象 With fs .LookIn = ThisWorkbook.Path & "/1" '设置搜索路径 .Filename = "A-JL-08 中间交工证书.doc" '要搜索文件名和类型 .SearchSubFolders = True '是否需要搜索子文件夹 If .Execute > 0 Then '如果找不到文件