Hide Message Bar

C

carmjo005

I have a series of macros that modify data in a protected workbook. Only
certain users have permission under SharePoint to run the macros and modify
the data. At the end of the macro it displays a worksheet (read only) with
the current edited data visible for all to see. But I also get a Message
Bar(Excel 2007 below ribbon) “Server Workbook To modify this workbook, you
must check it out “ followed by a “Check Out†button. Can I some how get rid
of this Message Bar? And if so, how? From within the macro, or within the
settings?
I’ve tried Excel Options/Trust Center/Trust Center Settings…/Message Bar/
Never show information about blocked content, without success. And with the
Message Bar displayed and Record Macro on, tried View/Message Bar uncheck.
This works, but the code is not recorded. Also tried
Application.DisplayAlerts = False but it continues to appear.
Thanks
 
E

Eric Hubert

This may be long resolved for you. However, I was looking for the exact same thing that you were (seeing you posted on several other forums too) and was beating my head against my keyboard. I finally pieced together this (and THEN found numerous examples of course-doh) which seems to work to toggle the Message Bar on and off:
Application.CommandBars.ExecuteMso ("ViewMessageBar")

To determine the current state, use this:
Application.CommandBars.GetPressedMso("ViewMessageBar")

If you found a way to do this other than checking the ribbon check box control for this, I'd love to know. Using the commandbar object doesn't seem like the most direct route.

-Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top