I'm trying to create a KnightRider type bar that runs on a worksheet and just keeps looping but does'nt effect the use of the spreadsheet.
I've started with the following code which makes one box light red then one dark red, then the next one light red, previous one dark red...etc..
I'm only new to VBA though and you can't see this running it just shows as it would after all the code has run.
Although this is just a want it could be of use to add a certain amount of animation to a sheet.
Please help.
Dim i As Long, tot As Long
tot = 100
For i = 1 To tot
ActiveSheet.Shapes("Rectangle 1".Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 10
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Next i
For i = 1 To tot
ActiveSheet.Shapes("Rectangle 2".Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 10
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Next i
I've started with the following code which makes one box light red then one dark red, then the next one light red, previous one dark red...etc..
I'm only new to VBA though and you can't see this running it just shows as it would after all the code has run.
Although this is just a want it could be of use to add a certain amount of animation to a sheet.
Please help.
Dim i As Long, tot As Long
tot = 100
For i = 1 To tot
ActiveSheet.Shapes("Rectangle 1".Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 10
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Next i
For i = 1 To tot
ActiveSheet.Shapes("Rectangle 2".Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 10
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Next i