View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Greg Wilson Greg Wilson is offline
external usenet poster
 
Posts: 747
Default specialeffect to command button

I doubt very much if I'm ahead of you at all Steve. You probably read a
little too much into my post.

If you add a Label from the Control Toolbox and format its special effect to
raised, then sunken, etched etc., and look at it with a 300% zoom, you can
easily see how they do the graphics. I just replicate this programmatically
using Autoshapes and group them. One wrinkle is that you have to adjust one
of the workbook colours to replicate the button colour. I havn't been able to
do this programmatically since it requires adjustment of Hue, Saturation and
Luminance and not just RGB. This is easily done manually through
ToolsOptionsColor tabModifyCustom tab.

You can use it to replicate a VB form - i.e. apply the raised effect and
button colour to a large range of cells and apply the sunken effect to cells
within the first range to make them appear like text boxes on a user form.
Use the etched effect for frames. Combine this with EnableSelection =
xlUnlockedCells, protect the sheet and it acts like a user form. Good for
making it intuitively obvious where to enter data and you can rely on
formulae instead of code for much of the operation. A change from the usual
if nothing else.

Regards,
Greg




"STEVE BELL" wrote:

Greg,

You're way ahead of me...

As you pointed out - the secret is in creativity using what already exists
in Excel.

With most controls you can work with the different properties such as color
and font and .....
Throw in the use of shapes, cells, pictures, etc and you have a wide choice
of what you can do.

The trick is figuring out what it is you really want. Most of my projects
entail a fair amount of time finding out what the user really wants...

--
steveB

Remove "AYN" from email to respond
"Greg Wilson" wrote in message
...
I don't believe there is any way to change the appearance of controls
either
from the Forms toolbar or from the Control Toolbox toolbar without at
least
resorting to complex API code. Steve's post seems to imply that he might
have
some ideas however, which has me interested.

I wrote a utility a while back that replicates the common 3D special
effects: Raised, Sunken, Etched and Bump. The effects can be applied to
either worksheet cells or to rectangles. I prefer to create my own command
buttons from applying the Raised effect to cell(s) and assigning a macro
to
the special effect graphic. The cell text serves as the caption. The
command
buttons thus created look identical to those from the Control Tollbox
except
you have better control over the text; and the caption can, for that
matter,
be a formula and thus change depending on conditions.

Using the same methodology, I suppose you could create different special
effects although I can't think of anything effective. You need to be
specific
in what you're trying to achieve.

Regards,
Greg



"ilyaskazi" wrote:


is it possible to apply special effect to command button?

or other alternative...


--
ilyaskazi
------------------------------------------------------------------------
ilyaskazi's Profile:
http://www.excelforum.com/member.php...o&userid=23969
View this thread:
http://www.excelforum.com/showthread...hreadid=389564