Hi,
I am using the following sub to update a reporting metrics (MS Access/Excel). Currently, this sub refreshes the reports perfectly; however, I would like to modify it to add the following:
1. Save the workbook
2. Close it
3. Open password protected workbooks
Your suggestion and assistance is appreciated.
Thanks
=============================================================
Public Sub RefreshMatrics()
Dim ObjXL As Object, x
On Error Resume Next
Set ObjXL = CreateObject("Excel.Application")
With ObjXL.Application
.Visible = True
.workbooks.Open "Path..."
x = .ActiveWorkbook.refreshall
End With
Set ObjXL = Nothing
End Sub
=============================================================
I am using the following sub to update a reporting metrics (MS Access/Excel). Currently, this sub refreshes the reports perfectly; however, I would like to modify it to add the following:
1. Save the workbook
2. Close it
3. Open password protected workbooks
Your suggestion and assistance is appreciated.
Thanks
=============================================================
Public Sub RefreshMatrics()
Dim ObjXL As Object, x
On Error Resume Next
Set ObjXL = CreateObject("Excel.Application")
With ObjXL.Application
.Visible = True
.workbooks.Open "Path..."
x = .ActiveWorkbook.refreshall
End With
Set ObjXL = Nothing
End Sub
=============================================================