1.定義工作簿
2.增加工作簿
3.源數(shù)據(jù)的復(fù)制
4.新工作簿的粘貼
5. saveas 保存
Dim wb As
Excel.Workbook
Set
wb = Workbooks.Add
sh.UsedRange.Copy
wb.Sheets(1).Paste
Dim
tmp
tmp
= Application.DisplayAlerts
Application.DisplayAlerts = False
wb.SaveAs
fileName:=dataPath & "RM-QDII " &
dts & ".rm3D", FileFormat:=xlText
Application.DisplayAlerts = tmp
wb.Close False
//////////////////////
OpenWorkbook pathstring2 &
"Send report\" & "ETC&QDII匯總數(shù)據(jù)-日度-"
& etc_report_date2 & ".xls"
ThisWorkbook.Worksheets("每日持倉匯總").Range("A8:m8").Copy
Workbooks(dailyworkbook).Sheets(1).Range("A7:M7").PasteSpecial
Paste:=xlPasteValues
Workbooks(dailyworkbook).Sheets(1).Activate
|