View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Neal Zimm Neal Zimm is offline
external usenet poster
 
Posts: 345
Default Deleting a Command Bar 14May

Peter, Sorry for the delay in getting back to you.
Thanks for the xlb answer.

I have a personality flaw where I get too precise with the English language.

Of course the toolbar is "attached" to the Wbk, workbook VBA code created
it, and another Wbk, without the VBA, will not show that tool bar. My last
question on this
matter is inside the command bars loop below.

My reading of the the Help phrase, "There is no programmatic way....."
meant
that:
If my Wbk name is "D3333.xls",

Dim CBar As CommandBar

For Each CBar in CommandBars

'What can you put here that will provide data about
' the command bars created for the above named workbook and not
'any other Wbk without doing something "special" ?? Special
stuff would
'include putting "D3333.xls" into the .Tag property when the
toolbar or menu
'was created.

Next CBar

' NOTE: VBA that scans the VBE source code modules for a project
might be
able to do it, but I don't think that what the MSoft help phrase
meant.

Thanks again for your time on this,
Neal Z.

--
Neal Z


"Peter T" wrote:

Sounds like an attached toolbar to me. In 97-2003 (you have 2002 right?) do
Customize toolbars, Attach... and follow your nose (ensure the suspicious
workbook is active first)

If you delete your xlb yes a new default one will be created, though you'll
lose all your customized toolbars of course.

Regards,
Peter T

"Neal Zimm" wrote in message
...
Peter,
From the mso help I didn't think you could "attach" a command bar to a
workbook. These guys are at the office level, no ? In the Help its says
there's no
programmatic was to return the command bars attached to a workbook.

By the way, if one deletes the Excel10.xlb workbook, (that's the
templates,
isn't it?)
Does Excel re-create it? I was thinking about that as a last gasp method.

Here's my response to Wrangler how it's now gonzo.

Well Mangler,
Your code deleted it, but it came back.
Re-read my own question and RE-ADDED IT BUT WITH THE TEMPORARY PARM.

Deleted it again. Closed the workbook.

Re-opened the offending workbook, and it now appears to be gone for good.
Thanks.
--
Neal Z
--
Neal Z


"Peter T" wrote:

Is the toolbar attached to the workbook.

Regards,
Peter T



"Neal Zimm" wrote in message
...

Hi All,
When learning about menus and command bars from Walkenbach's book, I
set
up one called "rmws1". I can't find the code that did it, probably
forgot
to
use Temporary. I have others that delete properly @ the beforeclose
event.

I use excel 2002.

I don't want it, and it keeps 'popping' up @ workbook open,
and I delete it with: Application.CommandBars("rmws1").Delete
but it still flashes on the screen first.

Tried opening Excel10.xlb in the Excel folder, but I guess it's
behind the scenes.

How do I permanently delete it ?
Thanks, Neal
--
Neal Z


.



.