Update Ribbon Editbox in runtime

Paul Sansom

Board Regular
Joined
Jan 28, 2013
Messages
178
Office Version
  1. 2021
  2. 2016
Platform
  1. 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
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:

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I finally worked out how to do this with the help of an article by Rob De Bruyn and RoryA, and much trial and errors.
I will come back and post the solution here soon... Paul
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top