
03-26-2009, 07:30 AM
|
|
Regular
|
|
Join Date: Feb 2009
Posts: 54
|
|
What it sounds like your looking to do is add a splash screen to your excel doc. I was having issues making the background for the form transparent so, scrapping it and just adding a image worked better. Though the correct way is a form, this should get you started. Just add the image using the control box, apply the image in the properties. Run the Bouncing_ball sub, this could be applied to the statup process to run. Make the image visible when it loads then invisible at the end of the sub.
Private Sub Workbook_Open()
'Add the finished code here and it will run each time the workbook is opened.
End Sub
Code:
Public Function Pause(DelayInSeconds As Double)
Dim StartTime As Double
StartTime = Timer
Do While Timer < StartTime + DelayInSeconds
DoEvents
Loop
End Function
Sub Bouncing_Ball()
ActiveSheet.Shapes("Image1").Select
Dim X As Integer
Dim y As Integer
Dim z As Integer
For z = 1 To 3
For X = 30 To 33
Selection.ShapeRange.IncrementLeft X
Selection.ShapeRange.IncrementTop X
Pause (0.15)
Next
y = 35
For X = 30 To 33
Selection.ShapeRange.IncrementLeft y
Selection.ShapeRange.IncrementTop -y
Pause (0.15)
y = y - 1
Next
Next
End Sub
|
Last edited by tken22; 03-26-2009 at 08:03 AM.
|