Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
BackColor, Forecolor, Bold, and Font Size for ComboBox in Commandbar
I have created a ComboBox in an Excel Commandbar. The ComboBox which
is an CommandBarComboBox object displays a white background and black text. The properties of this object do not expose colors or Font changes. (In contrast to the ComboBox in a UserForm which does) I would like to spiff up this control by adding BackColor, ForeColor and changing the Font and Font Bold property. It seems that API calls are the way to go, but in using hwnd finders such as WINSPY, I am not able to find the hwnd of the ComboBox that I created in the CommandBar; thus I cannot 'see' the hwnd of a comboBox in the Commandbar! (I can see the Commandbar) How do I find the object in the Excel CommandBar or how do I reference the object such that I could change its properties such as Color, Font etc.? I have read up about OwnerDrawn controls and most code is C++ oriented with MFC thrown in. I dont want to be a programming specialist in C++/MFC but I can follow the VB code/process if there was a process to make these changes for use in the Excel VBA environment. Can anyone help with Code Example(s) that would identify the ComboBox object in the CommandBar and then using the identifier to change the Color and Font properties - I would be very grateful. An extension of this request is how to identify/address the id of a CommandButton, ListBox on a UserForm - I have considered the SetFocus command when the UserForm has opened, but that is where I am at. In terms of practicality, this request is to advance my knowledge of API use/API flexibility of application of Controls in Excel in the VBA environment. TIA SZ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can you keep a cells BOLD Font, cell color size | Excel Discussion (Misc queries) | |||
Font Size for Forms ComboBox in Excel | Excel Worksheet Functions | |||
change font size and bold in cell? | Excel Programming | |||
Value of ComboBox on Custom CommandBar | Excel Programming | |||
Changing font size, bold and underline | Excel Programming |