View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Julian Cox Julian Cox is offline
external usenet poster
 
Posts: 5
Default Commandbar frustration.

"Tom Ogilvy" wrote:

Hi Tom

Maybe Excel VBA help can shed some light on #1

When a workbook is embedded in another application and activated by the user
by double-clicking the workbook, using this property with a Workbook object
returns the set of Microsoft Excel command bars available within the other
application. At all other times, using this property with a Workbook object
returns Nothing.


That goes stright over my head, even on the third reading. Wibble.
What section of the help is it in? Maybe the full context will help.
All it appears to be saying is that using application.commandbars
returns the commandbars in the container application even if that is
not excel. For example if an .xls was embedded in a word document
using application.commandbars would return the word command bars.
Which is obvious.
Looking at the VBA help ThisWorkBook is exactly what I should be using
in my situation.

Your probably beyond this article, but it might be useful:

http://msdn.microsoft.com/library/techart/ofcmdbar.htm

Some of it is certainly useful, I shall come back to the section on
user-proofing command bars.


http://support.microsoft.com/default...71&Product=ofd

How To Create a Transparent Picture For Office CommandBar Buttons


I thought this one had cracked it, Mask properties sound like exactly
what I need. Then I read it again and spotted 'Office XP offers a new
Picture and Mask property....'. Nuts, I'm on xl 2000. Ho Hum.


http://support.microsoft.com/default...50&Product=ofd

How To Add a Transparent Icon to a Toolbar Button


This is just pasting the face from an Icon resource file instead of
from a picture object. I was really hoping not to need to do
something like this as I want to be able to distribute my code in a
single .xla file. Can an icon resource be embedded in a sheet like a
picture can? I guess I'll have to try it to find out if the paste is
done correctly. There is some hope as the blank button used as the
background is truly blank, not background coloured. It all depends on
how intelligent DrawIconEx() is I think. Can an icon have null data,
the 17th colour, for pixels like a button face does?

Thanks for the links.

Cheers

Julian