Sub openFile() Workbooks.Open Filename:= _ "URL" Worksheets("").Activate 'Destination sheet 'code to prepare print area etc If Workbooks.CanCheckOut("") = True Then ActiveWorkbook.CheckOut Else 'code to handle error and close destination workbook Application.Run "FY14 CR CAM Qualified Opportunity Report!refreshall" End If If ActiveWorkbook.CanCheckIn = True Then ActiveWorkbook.CheckIn ActiveWorkbook.Close MsgBox "The file has been checked in." End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)