如何将宏ie和excel文件的结果保存在宏文件所在的同一文件夹中?
我正在尝试使用以下代码:
CurDir
ActiveWorkbook.SaveAs FileName:="Accenture.xlsx" FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
答案 0 :(得分:2)
尝试:
{{1}}
有关详细信息,请参阅:
Workbook.Path Property
How to: Get and Set the Default File Path for Workbooks
答案 1 :(得分:0)
使用此:
ThisWorkbook.SaveAs ThisWorkbook.Path & Application.PathSeparator & "dummy.xlsm"