Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default 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



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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

.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default 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
|
| .
|

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ribbon toggle button issues xp Excel Programming 0 December 2nd 09 07:01 PM
Ribbon and Office Button Hidden L Lightner Excel Discussion (Misc queries) 2 September 1st 09 02:04 PM
changing the order of the ribbon button Craig Excel Discussion (Misc queries) 1 April 28th 08 10:14 PM
no custom button in ribbon Birgit[_2_] Excel Programming 3 February 21st 08 03:41 PM
Add strikethrough button to ribbon George Conard Excel Discussion (Misc queries) 1 February 15th 08 08:53 PM


All times are GMT +1. The time now is 10:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"