Using the ShowToolbar Method to Hide the Ribbon
Today’s guest blogger is Edwin Blancovitch. Edwin is president of Advanced Developers.net, creators of Easy Payroll, a software package to manage your human resources, payroll, scheduling, time and attendance needs. I have been using the ribbon for the last two years and I like it so much, however there was a situation where I wanted to hide the ribbon. I used the Minimize the Ribbon command to hide it, but there was still some space being used by the Office button and the ribbon tabs. After some experimentation and some research I found that I could use the ShowToolbar method to hide the ribbon. The following line of code makes the ribbon disappear completely, and allows you to see the application like in Office 2003, without the command bars. DoCmd.ShowToolbar "Ribbon", acToolbarNo That will make the ribbon disappear completely, and allow you to see the application like in Office 2003, without the command bars. To display the ribbon again, use this code: DoCmd.ShowToolbar "Ribbon", acToolbarYes I wrote an article a long time ago for creating context command bars with VBA code, now it will be great to experiment by creating new command bars that go in the top menu. You can use context command bars in your forms, and make it work the way you wanted. <div
|