Search

E02-VBA to link SharePoint in Edit Mode and do Bulk Write back and more


Hello friends, all relevant materials for this topic/tutorial can be downloaded from here. Please support by subscribing to our channel and sharing them with your friends.


Like what I do? Donate
Did I help you? Did one of my tutorials save you sometime? 
You can say thank you by buying me a cup of coffee, I go through a lot of it.
Help keep Greater Good resources free for everyone. Please donate today. 




Option Explicit
Sub link_edit_Mode()

'-----------------------------
'Thanks for downloading the code. 
'Please visit our channel for a quick explainer on this code.
'Feel free to update the code as per your need and also share with your friends.
'Download free codes from http://vbaa2z.blogspot.com
'Subscribe channel: youtube.com/vbaa2z
'Author: L Pamai (vbaa2z.team@gmail.com)
'-----------------------------
    
    Dim mySh As Worksheet
    Dim spSite As String
    
    Set mySh = Sheets(1)
    
    Dim src(0 To 1) As Variant
    
    spSite = "http://lp-pc/" 'site name
    src(0) = spSite & "/_vti_bin"
    
    src(1) = "{ENTER YOUR GUID HERE}" 'GUID
    
    mySh.ListObjects.Add xlSrcExternal, src, True, xlYes, mySh.Range("A1")
    
End Sub

Sub SaveChanges()


'-----------------------------
'Thanks for downloading the code. 
'Please visit our channel for a quick explainer on this code.
'Feel free to update the code as per your need and also share with your friends.
'Download free codes from http://vbaa2z.blogspot.com
'Subscribe channel: youtube.com/vbaa2zot.com
'Author: L Pamai (vbaa2z.team@gmail.com)
'-----------------------------
   Dim mySh As Worksheet
   Dim lstOBJ As ListObject

   On Error GoTo errhdnler
   
   Set mySh = Sheets("DataSP")
   Set lstOBJ = mySh.ListObjects(1)
   
   lstOBJ.UpdateChanges xlListConflictDialog
   
   Set mySh = Nothing
   Set lstOBJ = Nothing
   
Exit Sub
errhdnler:

Debug.Print Err.Description & Err.Number

End Sub


Sub refresh_Con()

'-----------------------------
'Thanks for downloading the code. 
'Please visit our channel for a quick explainer on this code.
'Feel free to update the code as per your need and also share with your friends.
'Download free codes from http://vbaa2z.blogspot.com
'Subscribe channel: youtube.com/vbaa2z
'Author: L Pamai (vbaa2z.team@gmail.com)
'-----------------------------

   Dim mySh As Worksheet
   Dim lstOBJ As ListObject

On Error GoTo errhdnler

   Set mySh = Sheets("DataSP")
   
   Set lstOBJ = mySh.ListObjects(1)
   
   lstOBJ.Refresh
  
   Set mySh = Nothing
   Set lstOBJ = Nothing
   
Exit Sub

errhdnler:

Debug.Print Err.Description & Err.Number

End Sub