This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'VBA | |
'Spin buttons increase/decrease by 1 | |
Sub spin_onAction(control As IRibbonControl) | |
If control.id = "spinner_spinUp" Then | |
SpinValue = SpinValue + 1 | |
ElseIf control.id = "spinner_spinDown" Then | |
SpinValue = SpinValue - 1 | |
Else | |
Exit Sub | |
End If | |
rbxUI.InvalidateControl "editBox" | |
Sheet1.Range("H9").Value = SpinValue | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--XML--> | |
<!--Spinner--> | |
<group id="grp_spinner" label="Spinner Button"> | |
<box id="box_spinner" boxStyle="vertical"> | |
<box id="box2_spinner" boxStyle="vertical"> | |
<labelControl id="lblControl" /> | |
<labelControl id="lblControl2" label="Value" /> | |
</box> | |
<box id="box3_spinner" boxStyle="vertical" > | |
<labelControl id="lblCtrl_dummy3" /> | |
<box id="box1" boxStyle="horizontal"> | |
<editBox id="editBox" getText="editBox_getText" sizeString="xxxx" maxLength="4" onChange ="editBox_onChange"/> | |
<buttonGroup id="btnGrp_spinner"> | |
<button id="spinner_spinDown" imageMso="DownArrow2" onAction="spin_onAction"/> | |
<button id="spinner_spinUp" imageMso="UpArrow2" onAction="spin_onAction"/> | |
</buttonGroup> | |
</box> | |
</box> | |
</box> | |
</group> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment