Closed Thread
Results 1 to 5 of 5

CommandBar control ID help.

  1. #1
    Dev
    Guest

    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. #2
    Die_Another_Day
    Guest

    Re: 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. #3
    Dev
    Guest

    Re: 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. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    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

  5. #5
    Die_Another_Day
    Guest

    Re: 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!!

    > >
    > >



Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1