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


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



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




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



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
Assign hyperlink to new commandbar control mabond Excel Programming 3 August 22nd 05 02:33 PM
Can a CommandBar Control Caption be Formatted ? RAFAAJ2000[_2_] Excel Programming 5 July 10th 05 08:16 AM
How control where the CommandBar will be placed? Gunnar Johansson[_5_] Excel Programming 4 May 9th 05 04:07 AM
commandbar control and application.caller Doug Glancy Excel Programming 3 March 1st 04 09:47 AM
Add control to commandbar Dan[_20_] Excel Programming 2 August 27th 03 04:47 PM


All times are GMT +1. The time now is 05:31 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"