Go Back   Access World Forums > Microsoft Access Discussion > Macros

 
Reply
 
Thread Tools Rating: Thread Rating: 53 votes, 4.92 average. Display Modes
Old 06-23-2008, 07:45 AM   #1
Chai
Registered User
 
Join Date: Jun 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Chai is on a distinguished road
Cool Auto hide the ribbon & menu bars on load

Hello,
How can I hide the ribbon and all the other menu and tool bars (including the objects menu bar) automaticaly on the file open (autoexec macro ?)
Or alternatively, how can I make a user file that shows only the forms I have programed and designed and nothing else?

Thank You in advance
Chai

Chai is offline   Reply With Quote
Old 06-23-2008, 09:40 PM   #2
datAdrenaline
AWF VIP
 
Join Date: Jun 2008
Location: Northern Virginia
Posts: 697
Thanks: 0
Thanked 26 Times in 11 Posts
datAdrenaline is a jewel in the rough datAdrenaline is a jewel in the rough datAdrenaline is a jewel in the rough
In VBA add the line to HIDE the Office Button and Ribbon ...

DoCmd.ShowToolbar "Ribbon", acToolbarNo

Use ...

DoCmd.ShowToolbar "Ribbon", acToolbarYes

to turn them back on.
__________________
Brent Spaulding | datAdrenaline |
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
datAdrenaline is offline   Reply With Quote
The Following 9 Users Say Thank You to datAdrenaline For This Useful Post:
Big Pat (07-20-2014), EternalMyrtle (01-14-2014), Evon (01-01-2013), Little_Anj (05-08-2013), naungsai (10-11-2012), shamal (03-28-2016), Soniaski (01-08-2013), spudracer (08-04-2014), vicsar (09-01-2018)
Old 06-23-2008, 10:20 PM   #3
boblarson
Smeghead
 
boblarson's Avatar
 
Join Date: Jan 2001
Location: Oregon, USA
Posts: 32,068
Thanks: 97
Thanked 1,817 Times in 1,575 Posts
boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold
Welcome to AWF Brent! First Leigh and now you. We just had a huge increase in "expertese!" Very cool!


__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
boblarson is offline   Reply With Quote
Old 06-23-2008, 10:53 PM   #4
datAdrenaline
AWF VIP
 
Join Date: Jun 2008
Location: Northern Virginia
Posts: 697
Thanks: 0
Thanked 26 Times in 11 Posts
datAdrenaline is a jewel in the rough datAdrenaline is a jewel in the rough datAdrenaline is a jewel in the rough
Hey Bob!!! ...

Thanks for the welcome!! ... I have been meaning to check out "the other side of the tracks" for quite some time (actually lurked around a couple of times), and I was just enjoying my 'bout with insomnia (regular occurance for me!) and thought I'd check it out ...

Kinda cool to see familiar names! ... Now, I have to figure out all the tags to show some emoticon type stuff ...

EDITS ...

>> First Leigh and now you. We just had a huge increase in "expertese!" Very cool! <<

Well ... I gotta keep an eye on Leigh .. he might go spreading rumors about me! ... some folks think we're brothers or the same person using aliases (despite his OBVIOUS accent!) ... so I thought I'd sneak in too!
__________________
Brent Spaulding | datAdrenaline |
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by datAdrenaline; 06-23-2008 at 11:03 PM.
datAdrenaline is offline   Reply With Quote
Old 06-24-2008, 03:25 AM   #5
Chai
Registered User
 
Join Date: Jun 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Chai is on a distinguished road
Hide the Navigation Pane

thank you!
do you know how do I hide allso the Navigation Pane ?

(it's not working with the same command onle "Navigation" or "Navigation pane" insted of "Ribbon")


Quote:
Originally Posted by datAdrenaline View Post
In VBA add the line to HIDE the Office Button and Ribbon ...

DoCmd.ShowToolbar "Ribbon", acToolbarNo

Use ...

DoCmd.ShowToolbar "Ribbon", acToolbarYes

to turn them back on.

Last edited by Chai; 06-24-2008 at 10:28 AM.
Chai is offline   Reply With Quote
Old 06-24-2008, 09:27 AM   #6
ROMADOZ
Registered User
 
Join Date: May 2008
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
ROMADOZ is on a distinguished road
It works when I run my macro manually, but does not work when the macro runs on it's own on open. Help?

Last edited by ROMADOZ; 06-24-2008 at 01:28 PM. Reason: fixed part of hte issue... still need help with another part
ROMADOZ is offline   Reply With Quote
Old 06-24-2008, 02:32 PM   #7
datAdrenaline
AWF VIP
 
Join Date: Jun 2008
Location: Northern Virginia
Posts: 697
Thanks: 0
Thanked 26 Times in 11 Posts
datAdrenaline is a jewel in the rough datAdrenaline is a jewel in the rough datAdrenaline is a jewel in the rough
Hey Chai --

To hide the NavPane ... I use the following procedure:

Code:
 
Public Function HideNavPane() As Byte
    DoCmd.SelectObject acTable, "MSysObjects", True
    DoCmd.RunCommand acCmdWindowHide
End Function
To unhide the NavPane ...

Code:
 
Public Sub UnHideNavPane()
    DoCmd.SelectObject acTable, "MSysObjects", True
End Sub
Please note that the same code can be used to Hide/UnHide the database window in A2003 and prior.

__________________
Brent Spaulding | datAdrenaline |
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
datAdrenaline is offline   Reply With Quote
Old 06-24-2008, 02:36 PM   #8
datAdrenaline
AWF VIP
 
Join Date: Jun 2008
Location: Northern Virginia
Posts: 697
Thanks: 0
Thanked 26 Times in 11 Posts
datAdrenaline is a jewel in the rough datAdrenaline is a jewel in the rough datAdrenaline is a jewel in the rough
Hello Romadaz ..

Can you explain a bit more? ... I vaguely remember working with someone that had a similar issue ... I will do some digging and experimenting when I have A2007 available to me.
__________________
Brent Spaulding | datAdrenaline |
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
datAdrenaline is offline   Reply With Quote
Old 06-24-2008, 05:52 PM   #9
RuralGuy
AWF VIP
 
RuralGuy's Avatar
 
Join Date: Jul 2005
Location: @ 8300' in the Colorado Rockies
Posts: 13,817
Thanks: 7
Thanked 310 Times in 300 Posts
RuralGuy is just really nice RuralGuy is just really nice RuralGuy is just really nice RuralGuy is just really nice RuralGuy is just really nice
Quote:
Originally Posted by ROMADOZ View Post
It works when I run my macro manually, but does not work when the macro runs on it's own on open. Help?
I put it in the OnLoad event of the first form I open and it works just fine.
__________________
(RG for short) aka Allan Bunch Previous MS Access MVP acXP, ac07, ac10, ac13 - WinXP Pro, Win7 Pro, Win10 Pro
Please post back to this Forum so all may benefit.
Teaching is not filling a bucket but lighting a fire.
RuralGuy is offline   Reply With Quote
Old 06-24-2008, 10:40 PM   #10
d_rool
Registered User
 
Join Date: Jun 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
d_rool is on a distinguished road
I tried the code to hide the navigation pane. But it doesn't work. It closes the whole windows instead??? Any idea why?

Code i used:
DoCmd.SelectObject acTable, "MSysObjects", True
DoCmd.RunCommand acCmdWindowHide
d_rool is offline   Reply With Quote
Old 06-25-2008, 01:06 AM   #11
mattkorguk
Newly Registered User
 
mattkorguk's Avatar
 
Join Date: Jun 2007
Location: Surrey, England
Posts: 299
Thanks: 7
Thanked 7 Times in 5 Posts
mattkorguk is on a distinguished road
If you'd like it off all the time there's an option for that in the Database Properties, just untick the box for 'Full Menus' I think it's called.
mattkorguk is offline   Reply With Quote
Old 06-26-2008, 03:07 PM   #12
datAdrenaline
AWF VIP
 
Join Date: Jun 2008
Location: Northern Virginia
Posts: 697
Thanks: 0
Thanked 26 Times in 11 Posts
datAdrenaline is a jewel in the rough datAdrenaline is a jewel in the rough datAdrenaline is a jewel in the rough
Hello D_rool,

Do you want to HIDE the NavPane or MINIMIZE the NavPane? .. if you wish to MINIMIZE the NavPane ... you can toggle the NavPane from minimized to restored with the F11 key ... programatically I the following will do the trick ...

DoCmd.SelectObject acTable, , True
DoCmd.Minimize

{Note that you CAN leave the Object Name argument blank in the code I suggested in my earlier post.}
__________________
Brent Spaulding | datAdrenaline |
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
datAdrenaline is offline   Reply With Quote
The Following User Says Thank You to datAdrenaline For This Useful Post:
Soniaski (01-08-2013)
Old 07-05-2008, 12:00 AM   #13
Yu2008
Registered User
 
Join Date: May 2008
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Yu2008 is on a distinguished road
Red face Code: hide access ribbon but show refresh button ?

Quote:
Originally Posted by datAdrenaline View Post
In VBA add the line to HIDE the Office Button and Ribbon ...

DoCmd.ShowToolbar "Ribbon", acToolbarNo

Use ...

DoCmd.ShowToolbar "Ribbon", acToolbarYes

to turn them back on.
Hi, I am wondering is there a code that can hide the ribbon but the refresh button?

Thanks,

Yu
Yu2008 is offline   Reply With Quote
Old 07-05-2008, 09:42 AM   #14
boblarson
Smeghead
 
boblarson's Avatar
 
Join Date: Jan 2001
Location: Oregon, USA
Posts: 32,068
Thanks: 97
Thanked 1,817 Times in 1,575 Posts
boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold
Quote:
Originally Posted by Yu2008 View Post
Hi, I am wondering is there a code that can hide the ribbon but the refresh button?

Thanks,

Yu
You would need to build your own ribbon for that.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
boblarson is offline   Reply With Quote
Old 07-05-2008, 06:20 PM   #15
Yu2008
Registered User
 
Join Date: May 2008
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Yu2008 is on a distinguished road
Thanks Bob! oh... I see. that would be another big job for me though
8-) .

Yu2008 is offline   Reply With Quote
Reply

Tags
general , macros

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Customized Menu Bars SueBwork Forms 10 12-27-2011 12:43 PM
Hide all Access Toolbars and Menubars ghudson General 5 06-24-2011 01:11 PM
Hide default menu bars wazza Modules & VBA 5 11-24-2005 12:13 AM
Hide all Access Toolbars and Menubars ghudson Code Repository 0 11-22-2005 08:59 AM
Setting Customised Menu Bars Sharon Hague General 0 03-16-2005 06:53 AM




All times are GMT -8. The time now is 05:38 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World