ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CommandBar control ID help. (https://www.excelbanter.com/excel-programming/366513-commandbar-control-id-help.html)

dev

CommandBar control ID help.
 
I am trying to find ID for "Shift Cells Right" and "Shift Cells Down".

When I copy and click on "Inset Copied Cells..." option, then it provides me
2 options "Shift Cells Right" and "Shift Cells Down". I am trying to capture
those actions.

Any help is really appreciated.

Thank you!!

Die_Another_Day

CommandBar control ID help.
 
Range("A1:B2").Insert Shift:=xlDown
Range("A1:B2").Delete Shift:=xlUp
Range("A1:B2").Insert Shift:=xltoRight
Range("A1:B2").Delete Shift:=xltoLeft

HTH

Die_Another_Day
Dev wrote:
I am trying to find ID for "Shift Cells Right" and "Shift Cells Down".

When I copy and click on "Inset Copied Cells..." option, then it provides me
2 options "Shift Cells Right" and "Shift Cells Down". I am trying to capture
those actions.

Any help is really appreciated.

Thank you!!



dev

CommandBar control ID help.
 
When user selects "Shift Cells Right" and "Shift Cells Down" from Insert
Copied Cells options - I want to run a macro..

UseCase:

1. User copies cell "A" and then right clicks and selects "Insert Copied
Cells..." to paste it to another cell
2. Then it shows 2 sub options "Shift cells right" and "Shift cells down"; I
want to know which option user selected - so that I can run my macro
accordingly. Any idea?

"Die_Another_Day" wrote:

Range("A1:B2").Insert Shift:=xlDown
Range("A1:B2").Delete Shift:=xlUp
Range("A1:B2").Insert Shift:=xltoRight
Range("A1:B2").Delete Shift:=xltoLeft

HTH

Die_Another_Day
Dev wrote:
I am trying to find ID for "Shift Cells Right" and "Shift Cells Down".

When I copy and click on "Inset Copied Cells..." option, then it provides me
2 options "Shift Cells Right" and "Shift Cells Down". I am trying to capture
those actions.

Any help is really appreciated.

Thank you!!




Die_Another_Day

CommandBar control ID help.
 
Sry. I misinterpreted your question. I don't know how you would capture
that event.

Die_Another_Day
Dev wrote:
When user selects "Shift Cells Right" and "Shift Cells Down" from Insert
Copied Cells options - I want to run a macro..

UseCase:

1. User copies cell "A" and then right clicks and selects "Insert Copied
Cells..." to paste it to another cell
2. Then it shows 2 sub options "Shift cells right" and "Shift cells down"; I
want to know which option user selected - so that I can run my macro
accordingly. Any idea?

"Die_Another_Day" wrote:

Range("A1:B2").Insert Shift:=xlDown
Range("A1:B2").Delete Shift:=xlUp
Range("A1:B2").Insert Shift:=xltoRight
Range("A1:B2").Delete Shift:=xltoLeft

HTH

Die_Another_Day
Dev wrote:
I am trying to find ID for "Shift Cells Right" and "Shift Cells Down".

When I copy and click on "Inset Copied Cells..." option, then it provides me
2 options "Shift Cells Right" and "Shift Cells Down". I am trying to capture
those actions.

Any help is really appreciated.

Thank you!!





Leith Ross[_645_]

CommandBar control ID help.
 

Hello Dev,

The Insert menu button can be called by its ID. The options you are
interested in are on part of an internal dialog box created by the
insert macro. This dialog is not accessible through the menu and does
not have an ID number. You will have to use another approach.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=559126



All times are GMT +1. The time now is 03:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com