Hi,
I have an excel table which is getting the data for the first 6 (G-L) columns from a sharepoint list that we update, columns 7 and 8 (M & N) have a checkbox in created by a VBA code which I will post below.
(as per this tutorial video
)
However what I am finding, is that when we add a line or remove a line in the sharepoint list, and the data in excel updates, its changing the tickboxes in columns M & N instead of leaving them as they were, would anyone know a fix for this?
VBA Code
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("M:N")) Is Nothing Then
Select Case Target
Case Is = Chr(254)
Target = Chr(168)
Cancel = True
Case Is = Chr(168)
Target = Chr(254)
Cancel = True
End Select
End If
End Sub
I have an excel table which is getting the data for the first 6 (G-L) columns from a sharepoint list that we update, columns 7 and 8 (M & N) have a checkbox in created by a VBA code which I will post below.
(as per this tutorial video
However what I am finding, is that when we add a line or remove a line in the sharepoint list, and the data in excel updates, its changing the tickboxes in columns M & N instead of leaving them as they were, would anyone know a fix for this?
VBA Code
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("M:N")) Is Nothing Then
Select Case Target
Case Is = Chr(254)
Target = Chr(168)
Cancel = True
Case Is = Chr(168)
Target = Chr(254)
Cancel = True
End Select
End If
End Sub