Advertisement
Advertisement
| 04.03.2008 at 09:56AM PDT, ID: 23293436 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: |
Dim xltmp As New Excel.Application
Dim wks1 As Excel.Worksheet
Dim wks2 As Excel.Worksheet
Dim wbkSource As Excel.Workbook
'Dim xlObj As Object
Dim xlApp As Excel.Application
Dim wbkNew As Excel.Workbook
Dim wbkTarget As Excel.Workbook
Dim wks3 As Excel.Worksheet
txtNameEnd = Format(Now(), "mmddyy_hh_nn_ss")
'Set xlObj = CreateObject("excel.application")
Set xlApp = New Excel.Application
xlApp.Visible = False
Set wbkNew = xlApp.Workbooks.Add
xlApp.ActiveWorkbook.SaveAs "P:\Reporting\ActivityReports\VCC_ActivityRpt_XL_" & Forms!frmReports.txtNameEnd & ".xls"
Set wbkTarget = xlApp.Workbooks.Open("P:\Reporting\ActivityReports\VCC_ActivityRpt_XL_" & Forms!frmReports.txtNameEnd & ".xls")
'xlApp.Visible = True
Set wbkSource = xltmp.Workbooks.Open("P:\Reporting\ActivityReports\Template\VCC_Activity_Report_Main.xls")
'xltmp.Visible = True
Set wks1 = wbkSource.Sheets("Sheet1")
Set wks2 = wbkSource.Sheets("Summary")
'Set wks3 = wbkTarget.Sheets("Sheet1")
wks1.Copy Before:=wbkTarget.Sheets("Sheet1")
|