Sub Sample1()
With Application.FileDialog(msoFileDialogFilePicker)
If .Show = True Then
fn = .SelectedItems(1)
End If
End With
Workbooks(fn).SaveAs "d:\Users\Desktop" & "\123.xlsx"
End Sub
没有打开文件,当然另存不成功了
Sub Sample1()
With Application.FileDialog(msoFileDialogFilePicker)
If .Show = True Then
fn = .SelectedItems(1)
Workbooks.Open (fn)
ActiveWorkbook.SaveAs "d:\123.xlsx"
End If
End With
End Sub
没有打开文件,当然另存不成功了
Sub Sample1()
With Application.FileDialog(msoFileDialogFilePicker)
If .Show = True Then
fn = .SelectedItems(1)
Workbooks.Open (fn)
ActiveWorkbook.SaveAs "d:\123.xlsx"
End If
End With
End Sub