Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default VBE toolbar not ready for cutomizations

Hi keepITcool,

Thnx for the directions. Would try it out and post back in case of a
problem.

Thanks a lot,
Hari
India

"keepITcool" wrote in message
ft.com...
Hari,


I'm sorry, my code was NOT meant for cut & paste, but rather as an
example for you to study.

First:
Look in VBA help for Protection property on Commandbar object.




Second:

dim x as string
x="Standard"

compile error:
protection s/b .Protection


hth

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


Hari Prasadh wrote :

Hi KeepITcool,

Im sorry, I dont know how to proceed ahead.

I pasted your code on to my personal workbook as it is by including
sub and end sub.

I got an error for
a) -- with commandbars(x) -- variable not defined.. I included the
following statement -- Dim x As Integer
b) Then I got a compile error for -- if protection = 0 then --
Variable not defined -- I changed it, by putting a period before
protection c) The I re-ran the whole thing. I got a run-time error
'9' for subsript out of range within line -- with commandbars(x) --
I changed Dim x As Integer to Dim x As Long
d) Then i again got the same error. I changed it to -- Dim x As
String -- I got run time error '5' , invalid procedure call or
argument.

1) What should I define -- x as--

2) What code would I have to write within -- 'do your stuff --

Please guide me.

Thanks a lot,
Hari
India

"keepITcool" wrote in message
ft.com...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ready to paste Narendra Boga[_2_] Excel Discussion (Misc queries) 8 July 18th 09 05:25 AM
READY BAR MrDodd Excel Discussion (Misc queries) 2 July 31st 08 05:54 PM
Ready for this? It's a doozy! TVGuy29 Excel Discussion (Misc queries) 4 February 5th 08 02:36 AM
how to set up a 60 day ready reckoner David Rodrigo Excel Discussion (Misc queries) 3 December 17th 07 12:21 AM
SHOW SUM ON READY BAR CNCLARK Excel Discussion (Misc queries) 1 August 29th 07 02:20 PM


All times are GMT +1. The time now is 09:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"