Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Is there a RibbonX attribute that I can set on a tab that will minimize the tab?

Posted on 2011-09-03
3
343 Views
Last Modified: 2012-05-12
I have a USysRibbons file in Access 2007 that removes all default ribbon tabs and displays my one custom tab, but I want to ensure that my custom tab is minimized by default. Is there an attribute that I can set on my custom table to minize it?
0
Comment
Question by:RiverWalk
  • 2
3 Comments
 

Author Comment

by:RiverWalk
ID: 36480442
I found this code to minimize the ribbon.

if Application.CommandBars.Item(“Ribbon”).Height > 100 then
        SendKeys “^{F1}”, True
end if

I mainly want to minimize the Ribbon on startup only, so this might work for me, but I have ready several references from people saying that they do not like to use Send Keys. Can you please tell me why people might not like using Send Keys? Are there some problems inherent with using Send Keys?

Thank you,
RiverWalk
0
 

Author Comment

by:RiverWalk
ID: 36480482
Actually, once I implimented the above code, it did not work. No error messages, but it is not working.

I placed it in a function, like so....

Function MinimizeRibbon()
  If Application.CommandBars.Item("Ribbon").Height >= 100 Then
    SendKeys "^{F1}", False
  End If
End Function

And called it in the Form Open event, like this....

Call MinimizeRibbon

But nothing happens and the Ribbon is not minimized.
0
 
LVL 30

Accepted Solution

by:
hnasr earned 500 total points
ID: 36481934
I tried the function in a module and the code works.

SendKeys issues a key sequence for the open window.
See the efect by setting a break point after the call MinimizeRibbon statement, and the effect will be opening the help system.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question