|
楼主 |
发表于 2010-5-18 13:58
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub monthlyreport(branch As String, flowname3 As String)
'
' Macro1 Macro
' 宏由 yang.zhang 录制,时间: 2010-5-12
'
'
Windows("__MonthlyReportPivot.xls").Activate
ActiveSheet.PivotTables("还款数据透视表1").PivotFields("branch").CurrentPage = branch
ActiveSheet.PivotTables("还款数据透视表2").PivotFields("branch").CurrentPage = branch
ActiveSheet.PivotTables("还款数据透视表1").PivotFields("flowname3").CurrentPage = flowname3
ActiveSheet.PivotTables("还款数据透视表2").PivotFields("flowname3").CurrentPage = flowname3
ThisWorkbook.Activate
'Windows("复件 ___MonthlyReport(CB分行)风险与收益.xls").Activate
ChDir "C:\Documents and Settings\yang.zhang\桌面\yuebao"
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\yang.zhang\桌面\yuebao2\MonthlyReport(CB分行)还款 " & branch & flowname3 & ".htm", _
FileFormat:=xlHtml, ReadOnlyRecommended:=True, CreateBackup:=True
End Sub
求教版主。两个ActiveSheet来源于两个不同的SHEEt ,怎么把SHEET名字给加上 |
|