Solved

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

Posted on 2011-09-03
3
313 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

746 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now