I have following code, which check-out (locks) file with ID = 1, in Sharepoint Library Document application:
Sub LockAccessDatabase()
Dim context As New ClientContext("https://web.page.net/sites/MySite/")
Dim mylist As List = context.Web.Lists.GetByTitle("MyLibraryDocument")
Dim listItem As ListItem = mylist.GetItemById("1")
Dim file As File = listItem.File
file.CheckOut()
context.Load(file)
context.ExecuteQuery()
End Sub
It is using references:
Microsoft.SharePoint.Client
Microsoft.SharePoint
This code is working well, in Visual Studio, but then I need to use it in Excel application (translate to VBA). Unfortunatelly, when I try to import library to Excel Vba, I got following error:
For what I found - I need to declare necessary functions in the code. I need some support information how to do that. How can I know which functions I need to declare? How can I find necessary functions? I've spent so much time searching for this solution, and now it seems that I stuck just before finish.