Forum Discussion
Emil Rindell
Jun 26, 2018Copper Contributor
Dynamically update metadata from a cell
Hi, In excel I've created a link between a cell and custom properties. The value is dynamically updated in custom properties: How ever it is only created once in the files metadata...
Matt Mickle
Jun 28, 2018Bronze Contributor
Hey Emil-
This seems odd. I wonder if the data on SharePoint is refreshing properly. Will the value update if the Custom Property is hardcoded? If so you may be able to use a worksheet change event to update the value or perhaps a button with a macro linked to it. You may test this file (see attached) and see if that will work for your scenario.
If the linked custom property doesn't update then it would be kind of useless. Seems kind of glitchy if that's the case.
Change Event Macro:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = Range("rngProcent").Address Then 'Update the value of the hardcoded custom property to match that of 'the linked custom property.... ActiveWorkbook.CustomDocumentProperties("Procent").Value = Range("rngProcent1") End If End Sub
Button Macro:
Sub Rectangle1_Click() ActiveWorkbook.CustomDocumentProperties("Procent_1").Value = Range("rngProcent1") End Sub