+ Reply to Thread
Results 1 to 8 of 8

Execute ribbons just in specific workbook

  1. #1
    Registered User
    Join Date
    03-15-2011
    Location
    Bangkok
    MS-Off Ver
    Excel 2007
    Posts
    22

    Execute ribbons just in specific workbook

    Hello everyone,

    as described in the title I want to use:

    Please Login or Register  to view this content.
    to hide the ribbons. My problem is that they are executed in all open excel files. Is it possible to limit this to the file with the macro, so the ribbons are still there in the other workbooks?

    Thanks in advance,

    The Intern

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,268

    Re: Execute ribbons just in specific workbook

    Can't you use an if statement using the ActiveWorkbook.Name"
    Something like:
    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    03-15-2011
    Location
    Bangkok
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Execute ribbons just in specific workbook

    Thanks,
    my problem right now is that I don't know how:
    Please Login or Register  to view this content.
    works. I named the file and the sheet HideDemToolBars (just for a test) and nothing happend. What am I doing wrong?
    Last edited by The Intern; 03-21-2011 at 01:39 AM.

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,978

    Re: Execute ribbons just in specific workbook

    You need to use the Workbook_Activate and Workbook_Deactivate events as well to re-show or hide the toolbar as you switch between workbooks.
    Everyone who confuses correlation and causation ends up dead.

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

    Re: Execute ribbons just in specific workbook

    I don't think it's a good idea to do this especially as you don't really know what events you should use. If anything goes wrong will you be confident to solve any issues?

    Why not just use FullScreen
    Hope that helps.

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

    Free DataBaseForm example

  6. #6
    Registered User
    Join Date
    03-15-2011
    Location
    Bangkok
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Execute ribbons just in specific workbook

    Maybe you are right...my boss wanted my to hide the toolbar, but if it is that difficult I use the full screen. He wanted the file to look less like excel and more like a programm.
    Anyway, thanks a lot for your help, I could at least deepen my excel knowledge.

  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: Execute ribbons just in specific workbook

    I suspect the boss would yell the loudest if things did go wrong.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Execute ribbons just in specific workbook

    You code use StartFromScratch setting in ribbon xml.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

+ 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