Paul Sansom
Board Regular
- Joined
- Jan 28, 2013
- Messages
- 178
- Office Version
- 2021
- 2016
- Platform
- Windows
Hi
Is there a simpleway to update my Ribbon Editboxes from cell updates during runtime. I can seesimple ways to populate editbox when opening a Workbook, and updating a cellfrom the Ribbon Editbox during runtime. I cannot see a way to update the ribboneditbox on cell change? All solutionsgratefully received.
Below is a simple example of a sheet with edit box in Tab1 linked to A1 onSheet1. Works fine from Ribbon but I am not understanding how to get updates toribbon.
In Module1
In workbook XML
Many thanks Paul
Is there a simpleway to update my Ribbon Editboxes from cell updates during runtime. I can seesimple ways to populate editbox when opening a Workbook, and updating a cellfrom the Ribbon Editbox during runtime. I cannot see a way to update the ribboneditbox on cell change? All solutionsgratefully received.
Below is a simple example of a sheet with edit box in Tab1 linked to A1 onSheet1. Works fine from Ribbon but I am not understanding how to get updates toribbon.
In Module1
Code:
Option Explicit
Public Sub Editbox1_getText(control As IRibbonControl, ByRefreturnedVal)
' Code for getText callback. Ribbon control editBox
returnedVal = Sheet1.Range("A1")
End Sub
Public Sub Editbox1_onChange(control As IRibbonControl, Text AsInteger)
' Code for onChange callback. Ribbon control editBox
Sheet1.Range("A1") = Text
End Sub
In workbook XML
HTML:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon >
<tabs >
<tabid="Tab1"label="Tab1">
<group id="Group1" label="Group1">
<editBox id="Editbox1" label="Editbox1"getText="Editbox1_getText" onChange="Editbox1_onChange"/>
</group >
</tab >
</tabs >
</ribbon >
</customUI >
Many thanks Paul
Last edited by a moderator: