View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Preventing Customization


I'm NO fan of tampering with the users UI.

But if you have to:

use enabled property not the visible property.

it'll achieve what you want AND you can simply enable
all commandbars at the end of your code.
(the user gets his original toolbars back ,with correct positions and
correct visibility)






--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


msippitt wrote :


Hi,

Refers to Microsoft Excel 2000.

Within my VBA Code I am using the following to disable the
CommandBars:

'Ensure the user cannot access any of the Toolbars
For Each bar In Application.CommandBars
bar.Visible = False
Next

However the user, when in Excel can right click and choose
Customization and put the CommandBars back. Is there any way I can
prevent this happening.

TIA
Mark