![]() |
Get a specifc button Handle inside ribbon
Hi,
Im trying to make a program that clicks on a specific button inside a specif ribbon. I think i got use sendMessage to complete this task but first i need to find the handle of the button. So far i can get the handle oh the excel and then i used EnumChild Windows to find childs handles. But looking at the child texts i cant get anything thats looks with a the ribbon or the button. Can some one helpme? Should i look inside an specif child to find the ribbon and then inside the ribbon to find the button? if yes which one? Thnaks Sink |
Get a specifc button Handle inside ribbon
I don't think the ribbon exposes handles to the world, so I think you are
going to fail in this approach. Why not just change the code inside the callback event to a separate macro, call the macro from within the callback, and also where you need it. HTH Bob "Sink0" wrote in message ... Hi, Im trying to make a program that clicks on a specific button inside a specif ribbon. I think i got use sendMessage to complete this task but first i need to find the handle of the button. So far i can get the handle oh the excel and then i used EnumChild Windows to find childs handles. But looking at the child texts i cant get anything thats looks with a the ribbon or the button. Can some one helpme? Should i look inside an specif child to find the ribbon and then inside the ribbon to find the button? if yes which one? Thnaks Sink |
Get a specifc button Handle inside ribbon
only thing that have a handle is a 'window'. i don't think a ribbon button
is a window. anyway if you want to run a built in ribbon control you can try commandbars.executemso i think. i don't think you can do same with a custom control but then you can call the code yourself, not have to go throuh the control "Sink0" wrote in message ... | Hi, | | Im trying to make a program that clicks on a specific button inside a specif | ribbon. I think i got use sendMessage to complete this task but first i need | to find the handle of the button. So far i can get the handle oh the excel | and then i used EnumChild Windows to find childs handles. But looking at the | child texts i cant get anything thats looks with a the ribbon or the button. | Can some one helpme? Should i look inside an specif child to find the ribbon | and then inside the ribbon to find the button? if yes which one? Thnaks | | Sink |
Get a specifc button Handle inside ribbon
Hey thanks for the reply
How exatly i call the code myself. The button is inside a ribbon created by an third part COM add-in. Thanks "Homey" wrote: only thing that have a handle is a 'window'. i don't think a ribbon button is a window. anyway if you want to run a built in ribbon control you can try commandbars.executemso i think. i don't think you can do same with a custom control but then you can call the code yourself, not have to go throuh the control "Sink0" wrote in message ... | Hi, | | Im trying to make a program that clicks on a specific button inside a specif | ribbon. I think i got use sendMessage to complete this task but first i need | to find the handle of the button. So far i can get the handle oh the excel | and then i used EnumChild Windows to find childs handles. But looking at the | child texts i cant get anything thats looks with a the ribbon or the button. | Can some one helpme? Should i look inside an specif child to find the ribbon | and then inside the ribbon to find the button? if yes which one? Thnaks | | Sink . |
Get a specifc button Handle inside ribbon
Wht you mean saying to change the code inside callback. Which callback? The
button is inside a ribbon that was createad by a third part add-in. Then it open a new CommandBar so i have to fill some textboxes and finally press another button. Any idea? Thanks "Bob Phillips" wrote: I don't think the ribbon exposes handles to the world, so I think you are going to fail in this approach. Why not just change the code inside the callback event to a separate macro, call the macro from within the callback, and also where you need it. HTH Bob "Sink0" wrote in message ... Hi, Im trying to make a program that clicks on a specific button inside a specif ribbon. I think i got use sendMessage to complete this task but first i need to find the handle of the button. So far i can get the handle oh the excel and then i used EnumChild Windows to find childs handles. But looking at the child texts i cant get anything thats looks with a the ribbon or the button. Can some one helpme? Should i look inside an specif child to find the ribbon and then inside the ribbon to find the button? if yes which one? Thnaks Sink . |
Get a specifc button Handle inside ribbon
sorry, you are right if not your code you cannot call it. to bad they not
give us a way to execute custom controls. "Sink0" wrote in message ... | Hey thanks for the reply | | How exatly i call the code myself. The button is inside a ribbon created by | an third part COM add-in. | | Thanks | | "Homey" wrote: | | only thing that have a handle is a 'window'. i don't think a ribbon button | is a window. anyway if you want to run a built in ribbon control you can | try commandbars.executemso i think. i don't think you can do same with a | custom control but then you can call the code yourself, not have to go | throuh the control | | "Sink0" wrote in message | ... | | Hi, | | | | Im trying to make a program that clicks on a specific button inside a | specif | | ribbon. I think i got use sendMessage to complete this task but first i | need | | to find the handle of the button. So far i can get the handle oh the excel | | and then i used EnumChild Windows to find childs handles. But looking at | the | | child texts i cant get anything thats looks with a the ribbon or the | button. | | Can some one helpme? Should i look inside an specif child to find the | ribbon | | and then inside the ribbon to find the button? if yes which one? Thnaks | | | | Sink | | . | |
Get a specifc button Handle inside ribbon
Then I think you are totally stymied.
HTH Bob "Sink0" wrote in message ... Wht you mean saying to change the code inside callback. Which callback? The button is inside a ribbon that was createad by a third part add-in. Then it open a new CommandBar so i have to fill some textboxes and finally press another button. Any idea? Thanks "Bob Phillips" wrote: I don't think the ribbon exposes handles to the world, so I think you are going to fail in this approach. Why not just change the code inside the callback event to a separate macro, call the macro from within the callback, and also where you need it. HTH Bob "Sink0" wrote in message ... Hi, Im trying to make a program that clicks on a specific button inside a specif ribbon. I think i got use sendMessage to complete this task but first i need to find the handle of the button. So far i can get the handle oh the excel and then i used EnumChild Windows to find childs handles. But looking at the child texts i cant get anything thats looks with a the ribbon or the button. Can some one helpme? Should i look inside an specif child to find the ribbon and then inside the ribbon to find the button? if yes which one? Thnaks Sink . |
All times are GMT +1. The time now is 10:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com