Fading Form

hmk

Active Member
Joined
Jun 8, 2004
Messages
423
Hi there

Is there a code that makes a form invisible while making it transparent slowly..............?

And :

A code for Fading/Changing Colors on Form.............?
 

Some videos you may like

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

parmel

Active Member
Joined
Aug 24, 2005
Messages
324
I can't think of code to make a form gradually become transparent but here's some code that you can use to change colors gradually. For this to work the ShowModal property of the form has to be set to False. I put the code in the form Initialize event but I assume you'll want to put it elsewhere. Also, many variations of the color are possible.

Dim i As Integer, v As Double
Me.Show
For i = 1 To 200 Step 2
v = 0
Me.BackColor = RGB(i, 50, i)
Do
v = v + 1
Loop Until v = 1000000
DoEvents
Next i
 

Watch MrExcel Video

Forum statistics

Threads
1,118,534
Messages
5,572,741
Members
412,482
Latest member
arooshrana2
Top