View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default VBE toolbar not ready for cutomizations

Hari,

commandbars can have their Protection property set, thus disabling
customization.

in most cases you CAN set the protection to 0, but for some builtin bars
you cannot change it.

it's a good idea to reset the original protection after you've made
your changes.

dim lngProt as long
with commandbars(x)
lngprot = .protection
.protection=0
if protection = 0 then
'do your stuff
else
debug.print "cannot unprotect CB:" & .name
endif
.protection = lngprot
end with


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


Hari Prasadh wrote :

Hi,

Some of my toolbars within VBE are missing. Like -- comment block,
uncomment block -- etc. They are neither on the main toolbar and nor
within the Edit menu.

So I right clicked on the toolbar and Customize - and dragged the
needed icons to my standard toolbar.

I work for some time and then close excel (I save the workbooks). I
restart Excel- Alt + F11--- Lo! the comment and uncomment block is
again Missing!

And I have tried this many times, but somehow the VBE is adamant in
not getting customized.

Why is it happening? Please note I have customized toolbars in Normal
excel and they work perfectly fine. Any time I make changes to my
normal excel toolbar they would stay that way , next time I open
Excel the changes would have got applied. (I have the Excel10.xlb in
my C:\Documents and Settings\abc\Application Data\Microsoft\Excel).

Please guide me.

Thanks a lot,
Hari
India