为了使工作簿保存到单元格B19中引用的文件路径,正确的代码是什么?文件路径如下所示:C:Desktop \ ExcelFiles \ Data Table.xlsb
With Application
.ScreenUpdating = True
.EnableEvents = True
.DisplayAlerts = True
End With
ThisWorkbook.SaveAs Filename:=Sheets("Sheet1").Range("B19").Value
'^^^Need help understanding the correct syntax of this line ^^^
答案 0 :(得分:0)
这对我有用。
Sub SaveMe()
With Application
.ScreenUpdating = True
.EnableEvents = True
.DisplayAlerts = True
End With
ThisWorkbook.SaveAs Filename:=Sheets("Sheet1").Range("B19").Value, _
FileFormat:=xlExcel12, CreateBackup:=False
End Sub
基本上,只需打开宏记录器并稍微修改代码即可满足您的需求。