Add-in ribbon refresh

sgeogheg

New Member
Joined
Jul 4, 2016
Messages
2
<gs id="28b0a239-72b7-439a-8a4b-ec6aaf77d1e8" ginger_software_uiphraseguid="ebb3d3e2-4831-4374-a900-d0c202674f4e" class="GINGER_SOFTWARE_mark">Hi I</gs> have created and a <gs id="b534475a-8789-4d1c-9010-9f1fbac4aac2" ginger_software_uiphraseguid="ebb3d3e2-4831-4374-a900-d0c202674f4e" class="GINGER_SOFTWARE_mark">xlam</gs> Add-in. Clicking a button on the ribbon bar creates a new Workbook, and inserts a number of sheets. What I find is, that in the new <gs id="d5e3ec9e-bb50-4265-9d45-9f5b0f069c80" ginger_software_uiphraseguid="fc35e10c-7dc5-4587-81b6-e98d33842573" class="GINGER_SOFTWARE_mark">Worksheet</gs> my Add-in tab is not displayed until after all the code has completed executing.

This is a problem as I want to use Application<gs id="dde529d9-110a-46fa-9ac3-661249ad02e8" ginger_software_uiphraseguid="96026656-0ce1-4171-954d-a9786a34e246" class="GINGER_SOFTWARE_mark">.</gs>SendKeys "%Y1%" to select my Add-in Tab for the new worksheet. But as the tab is not visible this does not work.

Any Ideas on how to get around this will be gratefully received.

Cheers
Shaun
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Welcome to the forum.

You might try using Application.Ontime in your button's callback to run the actual processing code. That may allow the tab to show up. Alternatively use OnTime to call a routine that activates the tab. If you have 2010 or later you can avoid sendkeys and use the ActivateTab method instead, assuming you have an ****** callback storing a reference to the Ribbon.
 
Upvote 0
RoryA;4568129<gs id="8ebc8e73-d593-411d-b3b1-8748fef78c1e" ginger_software_uiphraseguid="a25bbe1d-6d6a-47c7-9e9a-8dc152ac6156" class="GINGER_SOFTWARE_mark"> said:
</gs>Welcome to the forum.

You might try using Application<gs id="a279de61-f303-42bd-a16e-12fc5b18830a" ginger_software_uiphraseguid="a5d0c487-c2fa-410c-a3b5-6c79e8e539db" class="GINGER_SOFTWARE_mark">.</gs><gs id="ad181e88-5737-4878-9ce3-22d59d2fa746" ginger_software_uiphraseguid="a5d0c487-c2fa-410c-a3b5-6c79e8e539db" class="GINGER_SOFTWARE_mark">Ontime</gs> in your button's callback to run the actual processing code. That may allow the tab to show up. Alternatively use <gs id="ae81762a-37dc-4c08-952a-f70c2dbc3e0d" ginger_software_uiphraseguid="73de0b7c-d948-4f17-a18c-e4dc49437dc8" class="GINGER_SOFTWARE_mark">OnTime</gs> to call a routine that activates the tab. If you have 2010 or later you can avoid <gs id="8ab37f68-c689-41fb-a676-0755f8177f70" ginger_software_uiphraseguid="ad1ff77d-66a6-41c6-9975-3faf129fd801" class="GINGER_SOFTWARE_mark">sendkeys</gs> and use the ActivateTab method instead, assuming you have an ****** callback storing a reference to the Ribbon<gs id="f23bfe49-0de4-40e2-b916-0024ce9e330f" ginger_software_uiphraseguid="ad1ff77d-66a6-41c6-9975-3faf129fd801" class="GINGER_SOFTWARE_mark">.</gs>


Thanks Rory this has helped a lot.:)
 
Upvote 0

Forum statistics

Threads
1,215,129
Messages
6,123,217
Members
449,091
Latest member
jeremy_bp001

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