J
jday
I am having an issue with my Autpen 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:
(Autpen)
If Application.CommandBars("Ribbon").Height > 80 Then SendKeys "^{F1}"
(Auto_Close)
If Application.CommandBars("Ribbon").Height < 80 Then SendKeys "^{F1}"
The Autpen 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?
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:
(Autpen)
If Application.CommandBars("Ribbon").Height > 80 Then SendKeys "^{F1}"
(Auto_Close)
If Application.CommandBars("Ribbon").Height < 80 Then SendKeys "^{F1}"
The Autpen 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?