Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set objExcel = CreateObject("Excel.Application")
- drPath = "serverfile"
- if (objExcel.Workbooks.CanCheckOut(drPath) = True) then
- objExcel.Application.Workbooks.CheckOut drPath //note - may need to open first
- objExcel.Application.Workbooks.Open drPath
- else
- msgbox("Unable to checkout SharePoint file: " & file.name & ". Please contact an administrator.")
- end if
- Private Sub Workbook_Open()
- 'The following command is equivalent to hitting the "Edit" bar
- 'that comes up when you open an Excel file by clicking on it in SharePoint,
- 'which is equivalent to "Edit in Microsoft Excel" (not CheckOut)
- ActiveWorkbook.LockServerFile
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement