Results 1 to 5 of 5
  1. #1
    3 Star Lounger siflaar's Avatar
    Join Date
    Jan 2001
    Location
    Amersfoort, Netherlands
    Posts
    203
    Thanks
    4
    Thanked 0 Times in 0 Posts

    button ID for Paste Values (NL/XL/2003)

    Hello,

    I like to re-create the button 'Paste Values' from the 'Edit menu' on a new commandbar
    I want to do it bij VBA, but I'm not able find to correct ID number.
    This functions is normaly not shown in the menu, but when altering the commandbars in Excel it is selectable from the Commands tab

    Thanks in advance for your answer.

    Patrick Schouten
    The Netherlands
    Greetings,

    Patrick Schouten
    (The Netherlands)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: button ID for Paste Values (NL/XL/2003)

    If you add the button manually, you can find the ID by typing the following in the Immediate window then pressing Enter:

    ? CommandBars("Standard").Controls("Paste Values").ID

    I get 370. You can then remove the button and write your code to add it.

  3. #3
    3 Star Lounger siflaar's Avatar
    Join Date
    Jan 2001
    Location
    Amersfoort, Netherlands
    Posts
    203
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: button ID for Paste Values (NL/XL/2003)

    Yes, this will do the trick
    Thanks again
    Greetings,

    Patrick Schouten
    (The Netherlands)

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: button ID for Paste Values (NL/XL/2003)

    That of course does not work on a different language of Excel.
    Download my xlmenufundict to get a listing of all commandbar Id's of the various Office apps.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: button ID for Paste Values (NL/XL/2003)

    I'm aware of that, of course, but the developer could find the ID using the local language, then use the language-independent ID from then on.

    But your XLMenuFuncDict workbook is very handy - I use it frequently.

Posting Permissions

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