0
的工作,我希望我希望一些能幫助我VBA另存爲在Excel 2013
我嘗試使用下面的代碼保存在Excel 2013文件,但我收到以下錯誤信息: -
方法 '另存爲' 對象 '__工作簿' 失敗
誰能指教?
Sub SaveFile()
Dim Destwb As Workbook
Dim FolderName As String
Dim Sourcewb As Workbook
Dim FileExtStr As String
Dim FileFormatNum As Long
Dim Name As String
Set Sourcewb = ThisWorkbook
Set Destwb = ActiveWorkbook
Name = Cells(2, 2).Value
FolderName = Sourcewb.Path & "\Files_with_graphs"
FileExtStr = ".xls": FileFormatNum = 56
With Destwb
.SaveAs FolderName _
& "\" & Name & FileExtStr, FileFormat:=FileFormatNum
.Close False
End With
End Sub
感謝這個,但是當我作出修訂,我得到了以下錯誤消息: - – nir020
該錯誤是沒什麼d o與此代碼並應列爲一個新的問題。如果這解決了保存問題,請標記爲答案。 –