+ Reply to Thread
Results 1 to 2 of 2

Set menu

Hybrid View

cachris Set menu 08-15-2014, 10:55 AM
arlu1201 Hello cachris, Welcome to... 08-15-2014, 10:56 AM
  1. #1
    Registered User
    Join Date
    10-09-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2003
    Posts
    0

    Set menu

    Hello to all.

    I have a xls file (2003) containing macro's that is used in excel 2013.
    It works well on all pc but not in one and I don't know why.

    The problem is with the following function that is called from from another proc without any parameter (it returns AAMenu ).
    I'm getting error 5 (Run-time error '5' Invalid procedure call or argument) when try to Set AAMenu(i).
    Did someone has the same problem or if someone can help, he ou she is welcome.

    Function getAACommandBars(Optional MenuName As String = "&Start") As Variant

    Dim i As Integer, AAMenu(2) As CommandBarControl, AAMenuName As Variant
    ReDim AAMenuName(2)

    AAMenuName = Array("Menu AA", "Worksheet Menu Bar", "Chart Menu Bar")

    For i = 0 To UBound(AAMenuName)
    Set AAMenu(i) = Application.CommandBars(AAMenuName(i)).Controls(MenuName)
    Next
    getMBSCommandBars = AAMenu

    end Function

    I copied the xls file that is working to the pc where it's not working (XLSTART)

    Thank you.

    Chris

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167
    Hello cachris,

    Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. 'Format' menu choice in home menu tab, using Excel for Mac 2011
    By cornbread_r_square in forum Excel General
    Replies: 0
    Last Post: 12-06-2013, 05:12 PM
  2. [SOLVED] Excel 2007 : new drop down menu based on dropdown menu in previous cell
    By martinpols in forum Excel General
    Replies: 3
    Last Post: 04-30-2012, 02:33 AM
  3. Replies: 3
    Last Post: 12-10-2009, 09:30 PM
  4. Replies: 0
    Last Post: 11-24-2005, 09:25 AM
  5. [SOLVED] Menu items added with menu item editor in older versions
    By Michael Hoffmann in forum Excel General
    Replies: 2
    Last Post: 01-07-2005, 10:06 AM

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