Excel XLL UDF

Add-in Express™ Support Service
That's what is more important than anything else

Excel XLL UDF
Skip calculation of UDF 
Andrei Smolin


Add-in Express team


Posts: 15286
Joined: 2006-05-11
SendKeys only works with the currently focused window. If it's okay with you, then it's okay with me :)

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 19 Jan, 2018 07:56:32 Top
Michael Kaden




Posts: 164
Joined: 2017-11-15
Dear Andrei,

I tried it. I trigger SendKeys.Send with a Ribbon Button and it actually is changing ALL Worksheets of the Workbook (= Excel Instance) where the Ribbon Button is located, not just the Worksheet in Focus (activated).
So Window in Focus means Active.Excel.Application?

So this solution is perfect for me.

thank you & regards

Michael
Posted 19 Jan, 2018 10:17:17 Top
Andrei Smolin


Add-in Express team


Posts: 15286
Joined: 2006-05-11
Michael,

Michael Kaden writes:
it actually is changing ALL Worksheets of the Workbook (= Excel Instance) where the Ribbon Button is located, not just the Worksheet in Focus (activated).


I suppose this occurs because you trigger a Ribbon button the Click event handler of which modifies something on all worksheets. Or, it modifies some property of the button itself?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Jan, 2018 05:40:20 Top
Michael Kaden




Posts: 164
Joined: 2017-11-15
Dear Andrei,

this is correct. The button also changes the Caption of all the buttons.

Thank you & regards

Michael
Posted 22 Jan, 2018 06:01:47 Top
Andrei Smolin


Add-in Express team


Posts: 15286
Joined: 2006-05-11
Michael,

Michael Kaden writes:
The button also changes the Caption of all the buttons.


That works in this way because you use the simple schema of refreshing Ribbon controls; see section Updating ribbon controls at run time at https://www.add-in-express.com/docs/net-ribbon-components.php#properties-events.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Jan, 2018 06:08:45 Top