Controlling user environment

C

Colinhp

I currently use similar code to the following to control what the user sees
when working with Excel tools I have created for my company. These settings
occur on Auto_Open. I then reverse these settings when the user closes the
workbook down. Is there a quicker way of controlling the user environment,
and if so, how do I do this?

With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = False
.DisplayZeros = False

Application.DisplayFullScreen = False
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
Application.CommandBars("Drawing").Visible = False
Application.CommandBars("Standard").Visible = True
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Reviewing").Visible = False
Application.CommandBars("Web").Visible = False

End With
 
B

Bob Phillips

That is pretty quick isn't it? what problem are you having particularly.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
C

Colinhp

Hi Bob,

If my current script is the correct way, there is no problem except for
confidence in knowing I'm achieving the most efficient way of accomplishing
my requirements. Thanks for the reply.
 
B

Bob Phillips

I would change it to save the current settings before you change them, so
that you can restore them afterwards.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

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

Shared Workbook 12
Customizing Shortcut Menus 0
MAJOR PROBLEM! --- Menu Bars don't unhide? 9
Stripping down excel 2
Workbook_close 1
1004 runtime error 1
auto enable macros 5
Activate Sheet 5

Top