ANIMATED TEXT

verluc

Well-known Member
Joined
Mar 1, 2002
Messages
1,451
This is a macro I found on this board.
The text goes from the left to the right.
How can I change this macro,so that the text goes from the right to the left?

Dim myText As String
Dim x As Integer, y As Integer
Dim myStart, myDelay
myText = " ........."
On Error GoTo myEnd
For y = 1 To 10
For x = 1 To 125
myStart = Timer
myDelay = myStart + 0.1
Do While Timer < myDelay
[N4] = Space(x) & myText
DoEvents
Loop
DoEvents
myStart = Timer
myDelay = myStart + 0.1
Next x
Next y
[N4] = ".................. "
myEnd:
End
An idea?Thanks
--------------------------------------------------------------------------------

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
Target.Interior.ColorIndex = 3
End Sub

y idea?
 
Hey guys & gals - is there any way to make this conditional on the contents of a cell?

Example: If cell A1 is equal to cell A2, I have a formula in cell A3 to return "O.K. to General Ledger". If cell A1 is not the same as cell A2, I have it return "Discrepancy". That's easy, but can I have it scroll only on the second condition (if it returns "Discrepancy"?

Purpose is to alert the final user that the two numbers don't match and that he/she needs to research and correct one of the entries.
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi Luc,
Thank you for excel-program for a football-league.
Wow, it's excellent.
I could not see the code because the project is protected..but It works perfectly.
 
Upvote 0
Hi i have edited and commented the code on this hope this is what you wanted. HTH
Jack

Put this code in sheet one, not standard module!!

'Sub Workbook_Open()
'Sheets("Sheets1").Select
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
' Codes supplied on MrExcel by many posters, Ivan F M started
' this code and we have expanded that start.
' Edited by Jack in the UK 9-9-02

' I have changed to PRIVATE from sub so the text runs and changes
' if you edit the debts figures

Dim myText As String
Dim x As Integer, y As Integer
Dim myStart, myDelay
myText = [C1]
' A1 will have debts 1000
' B1 will have debts 1000
' C1 will have the formula you require ie :
' =IF(A1=B1,"O.K. to General Ledger","Discrepancy")
On Error GoTo myEnd
For y = 1 To 2
For x = 50 To 1 Step -1
myStart = Timer
myDelay = myStart + 0.1
' A4 will be where the text scrolls
Do While Timer < myDelay
[A4] = Space(x) & myText
DoEvents
Loop
DoEvents
myStart = Timer
myDelay = myStart + 0.1
Next x
Next y
[B4] = "" '"Have a good day !!! "
' Jack has reset to blank not really needed
myEnd:
End
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,190
Messages
6,129,421
Members
449,509
Latest member
ajbooisen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top