ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Label Colour Fading (https://www.excelbanter.com/excel-programming/369607-label-colour-fading.html)

drawlings[_2_]

Label Colour Fading
 

Hi all,

Is there any code that allows me to fade the backcolor of a label?

Thanks

Da

--
drawling
-----------------------------------------------------------------------
drawlings's Profile: http://www.excelforum.com/member.php...fo&userid=3662
View this thread: http://www.excelforum.com/showthread.php?threadid=56899


Tom Hutchins

Label Colour Fading
 
If you use a Rectangle from the Drawing toolbar as your label, you can set
the transparency of the background color. You can also add formatted text to
a Rectangle.

Hope this helps,

Hutch

"drawlings" wrote:


Hi all,

Is there any code that allows me to fade the backcolor of a label?

Thanks

Dan


--
drawlings
------------------------------------------------------------------------
drawlings's Profile: http://www.excelforum.com/member.php...o&userid=36626
View this thread: http://www.excelforum.com/showthread...hreadid=568992



Joerg

Label Colour Fading
 

"drawlings" wrote
in message ...

Hi all,

Is there any code that allows me to fade the backcolor of a label?


Labels have a 'picture' property, so you could provide a suitable background
image to achieve the desired effect.
Joerg



drawlings[_3_]

Label Colour Fading
 

Thanks for your replys, but I would like to make the change on the fly
since I am using the label as a progressbar.


--
drawlings
------------------------------------------------------------------------
drawlings's Profile: http://www.excelforum.com/member.php...o&userid=36626
View this thread: http://www.excelforum.com/showthread...hreadid=568992


Joerg

Label Colour Fading
 
"drawlings" wrote
in message ...

Thanks for your replys, but I would like to make the change on the fly
since I am using the label as a progressbar.


You can change almost any property, that's not the point.
I was puzzled by "colour fading". I was thinking of gradient colour. But if
you need a progressbar, then 2 colours would do, right?
Here is an idea:

I assume that you want to put your progress bar on a UserForm. You need 3
labels:
1 label, width as desired for the progress bar, background color white, no
text

now put a copy of this label on top of it. For this second label change
properties:
initial width zero, background colour blue, no text (you guessed it, this
will become your progress bar)

On top of the whole thing place a centered text (another label)

According to progress of whatever your code is doing your code must change
the width of the blue label and the contents of the text label.
I haven't tested it, but it should work.

Cheers,

Joerg




All times are GMT +1. The time now is 08:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com