Search

How to build Professional Excel Add-in. Excel Add-in Development course

Subscribe Now!
New videos every Weekend!


Like what I do? Donate
Did I help you? Did one of my tutorials save you sometime? 
You can say thank you by buying me a cup of coffee, I go through a lot of it.
Help keep Greater Good resources free for everyone. Please donate today. 

How to build Professional Excel Add-in. Excel Add-in Development course



Related links.
https://docs.microsoft.com/en-us/office/vba/api/excel.application.onkey
https://vbaa2z.blogspot.com/search?q=ribbonx

<!--Ribbon customization by Lung Pamai; Last Modified:-->
<!--RIBBONX E01, E05-->
<!--http://msdn.microsoft.com/en-us/library/dd909393(v=office.12).aspx-->

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="false">
<tabs>

<tab id="IDTab5" label="DEMO" insertAfterMso="TabHome">

	<group id="IDGroup5" label="Connect">
	<button id="IDButton5" label="label1" size="large" onAction="macro1" imageMso="ImportMoreMenu" />
	</group>
	</tab>

	<tab idMso="TabHome">
	<group id="Group5" label="Custom Utilities">
	<toggleButton id="toggleButton" imageMso="SizeToControlHeightAndWidth" label = "Highlight Rows and Columns" size = "large" onAction = "ButtonToggled_click"  />
	</group>
</tab>

</tabs>
</ribbon>
</customUI>

GetKeyState

Declare PtrSafe Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Const VK_CONTROL As Integer = &H11