View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Greg Wilson[_4_] Greg Wilson[_4_] is offline
external usenet poster
 
Posts: 218
Default Creating a CommandBar - what's wrong?

The two leading dots are corruption of both Bob's and my
code. There should only one leading period.

Your code works for me assuming that the code is located
in the ThisWorkbook module. If it is located in another
module then the Private statement will make it unavailable.

I always fully qualify the CommandBars property during the
Workbook_Open event because I have found that it often
fails otherwise. When not qualified, it normally defaults
to the Application object. However, it seems that during
the Workbook_Open event this default behaviour has not yet
taken effect. Just an amateur's perspective.

So if your code already resides in the ThisWorkbook module
and it still doesn't work then I suggest fully qualifying
the CommandBars statements as "Application.CommandBars"

Regards,
Greg



-----Original Message-----
So... are two dots needed? I am getting an error when I

use two dots
for the properties.


---
Message posted from http://www.ExcelForum.com/

.