+ Reply to Thread
Results 1 to 7 of 7

Display commandbar as add-in

  1. #1
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Display commandbar as add-in

    Recently I have been having problems with commandbars in all spreadsheets.

    I downloaded the add a menu spreadsheet from royUK's website and when I open it I get...

    Please Login or Register  to view this content.
    ...and on debug the line in red

    I guess the red does not show up...the first line after Do

    Please Login or Register  to view this content.
    This file has opened fine in the past, but as of late I get this error. When I close the spreadsheet I get the run time error 91 again.

    Also, try to open Richard Schollar's HTML maker and I get...

    Please Login or Register  to view this content.
    ...and on debug the line in red

    I guess the red does not show up...the first line after On Error

    Please Login or Register  to view this content.
    I have other spreadsheets which use commandbars and I get errors. I've tried to narrow it down and can get the commandbar to show up by adjusting certain aspects of the code, but it seems the problem is coming for the removing of the commandbar on close.

    Any thoughts?
    HTH
    Regards, Jeff

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Problem with displaying commandbar as add-in

    It could be something to do with using Excel 2007. Commandbars & Menus are not supported in Excel 2007 onwards, they have been replaced by the Ribbon
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Problem with displaying commandbar as add-in

    Hi Roy,

    Why do you think these have worked for quite a while now or my 2007 and then just suddenly began throwing up errors?

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Problem with displaying commandbar as add-in

    Some vbCrLF's seem to be missing (before Loop and before IF)

    Please Login or Register  to view this content.
    Last edited by snb; 02-04-2011 at 12:53 PM.



  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Problem with displaying commandbar as add-in

    Hi snb,

    Not sure there is anything wrong with the code as it works perfectly fine on another 2007 machine.

    On the website there is a note:

    Please Login or Register  to view this content.
    Do you know where I can find an example of using a menu through the ribbon?

  6. #6
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Problem with displaying commandbar as add-in

    If the line is red it means it's a compile error. The reason is what I formulated in my previous post. Please read that again and insert a vbcrLF in the lines that are marked red. Do not look where it can't be found.

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Problem with displaying commandbar as add-in

    I think you have copied the code & somehow deleted the line breaks. try
    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.
    End Sub

+ Reply to 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