excel表格的一个工作表打印后 自动另存为另一个表格,到某个文件夹里,名字为某个单元格的内容
1个回答
展开全部
追问
追答
Sorry,笔误,忘了加双引号。
另外,根据你新的要求做了更改:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "意见书" Then
With ThisWorkbook.ActiveSheet
Workbooks.Add
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:="D:\" & .Range("A1") & ".xlsx"
Application.DisplayAlerts = False
.Copy Before:=ActiveWorkbook.Sheets(1)
ActiveWorkbook.Close True
End With
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |