LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Expand/collapse toolbar ribbon

I am having an issue with my Auto_Open and Auto_Close macros, where I am
basically trying to make sure the toolbar ribbon is "collapsed" when the user
opens the workbook, and "expanded" when they close it. I found a suggestion
from a previous post on this topic -- below is the code that was recommended:

(Auto_Open)
If Application.CommandBars("Ribbon").Height 80 Then SendKeys "^{F1}"

(Auto_Close)
If Application.CommandBars("Ribbon").Height < 80 Then SendKeys "^{F1}"

The Auto_Open macro works correctly---it ensures the ribbon is "collapsed"
upon opening the file. The problem is when the file is closed---for some
reason, instead of expanding the ribbon, it opens up the Help window instead
(the ribbon stays collapsed). Ideally, I would like to have the Auto_Close
procedure "restore" the ribbon to whatever the user had previously (either
collapsed or expanded) -- but I would settle for having it "always" expand
the ribbon when the file is closed to accommodate majority of users. What is
wrong with my current Auto_Close procedure?



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i expand and collapse rows office wreck! New Users to Excel 7 June 14th 09 08:41 PM
Expand Collapse Buttons Keith H[_2_] Excel Discussion (Misc queries) 0 April 17th 09 08:47 PM
Expand/collapse toolbar ribbon Rick Rothstein Excel Programming 0 April 14th 09 07:08 PM
Expand/collapse mdassi01 Excel Programming 3 January 29th 09 04:46 PM
expand/collapse row button caii Excel Discussion (Misc queries) 3 October 26th 05 09:44 AM


All times are GMT +1. The time now is 01:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"