【活頁簿另存新檔】
ActiveWorkbook.SaveAs
Filename:=存檔完整路徑含檔名, FileFormat:=檔案格式
範例:
'存成xlsx
ActiveWorkbook.SaveAs Filename:="a.xlsx",
FileFormat:=xlOpenXMLWorkbook
'存成xlsm
ActiveWorkbook.SaveAs Filename:="a.xlsm",
FileFormat:=
xlOpenXMLWorkbookMacroEnabled
'存成csv
ActiveWorkbook.SaveAs Filename:="a.csv",
FileFormat:=
xlCSV
'其它檔案格式代碼,請參閱以下文件連結
參考文件:
章老師的電腦小講堂 https://www.facebook.com/ScenicSchool/