Hide Elements Of Excel Program With VBA

I want to hide/unhide as much of the excel interface as possible using VBA (with a toggle button).
What's the hide / unhide VBA for each of these elements .....

> The Top bar (with (X close) and ribbon options
> The Ribbon
> Ribbon Headings (File , Home , Insert ..... )
> The Quick Access Toolbar
> Formula Bar
> Column + Row Headings (A , B , C , 1 , 2 .....)
> Worksheet Labels & Horizontal Scrollbar
> Bottom with Views & the % Magnifier Slider
> Vertical Scrollbar

I realise that it's unlikely that all of them can be hidden.
I have been to hide most of them manually, except for .....

> The Top bar (with (X close) and ribbon options.
> Worksheet Labels & Horizontal Scrollbar.
> Vertical Scrollbar.

Even if I could get to the above state with one click, with 3 elements showing that would be great.
LVL 24
EirmanChief Operations ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saurabh Singh TeotiaCommented:
Technically you can't hide ribbon but their is a way arround it... and i'm assuming you are looking for this..It will do what you are looking for...

Sub hideeverything()
    Application.DisplayFormulaBar = False
    ActiveWindow.DisplayHeadings = False
    With ActiveWindow
        .DisplayHorizontalScrollBar = False
        .DisplayVerticalScrollBar = False
        .DisplayWorkbookTabs = False
    End With
    Application.DisplayFullScreen = True
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rob HensonFinance AnalystCommented:
Have you tried just the Full Screen view? That hides quite a few elements but you will still need code for some of the others.
0
Rob HensonFinance AnalystCommented:
As I hit submit, I noticed the last line of code above that does just that, enables Full Screen View. To exit Full screen though you just press Esc key.
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

EirmanChief Operations ManagerAuthor Commented:
That code works really well Saurabh Singh Teotia. (In fact, better than I had hoped). Thank you.

I created a new sub called showeverything
I reckoned that by changing all FALSE to TRUE would show everything, but it doesn't work.
I have to press the Esc key as mentioned by Rob.

Where have I gone wrong?
0
Saurabh Singh TeotiaCommented:
Eirman,

Try using this way...

Sub backtonormal()

    ActiveWindow.View = xlNormalView
    Application.DisplayFullScreen = False
End Sub

Open in new window


Saurabh...
0
EirmanChief Operations ManagerAuthor Commented:
I tried this Saurabh, but I still have to press Esc to show the ribbon & formula bar.
Sub showeverything()
    Application.DisplayFormulaBar = True
    ActiveWindow.DisplayHeadings = True
    With ActiveWindow
        .DisplayHorizontalScrollBar = True
        .DisplayVerticalScrollBar = True
        .DisplayWorkbookTabs = True
    End With

    Application.DisplayFullScreen = False
    Application.DisplayFullScreen = True
End Sub

Open in new window


Use Sendkeys perhaps
0
Rob HensonFinance AnalystCommented:
You still have the "DisplayFullScreen = True" after the False setting.

Thanks
Rob
0
Saurabh Singh TeotiaCommented:
Eirman,

Quick question when you running this code are you on over that workbook which has full screen or you are their at some other workbook..??

And yeah you can use send keys like...

Sub showdata()
SendKeys "{ESC}"
End Sub

Open in new window


Saurabh...
0
EirmanChief Operations ManagerAuthor Commented:
Got it!
Many thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.