Excel VBA - Randomly Changing the Color of Symbols Using a Macro| Blinking Characters

Опубликовано: 07 Октябрь 2024
на канале: The World Of Algorithms
592
like

💡 Source Code

Public Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal ms&)

Sub Run_Macro()
Dim t As String, i As Integer, m As Byte, a As Byte, b As Byte, c As Byte
t = "The World of Algorithms"

With Range("A1")
.Clear
.Value = t
.Font.Bold = -1
.Font.Size = 25
End With

i = 1
While i ◀= Len(t)
DoEvents
If Mid(t, i, 1) ◀▶ " " Then

For m = 1 To 15
a = WorksheetFunction.RandBetween(1, 255)
b = WorksheetFunction.RandBetween(1, 255)
c = WorksheetFunction.RandBetween(1, 255)
Range("A1").Characters(i, 1).Font.Color = RGB(a, b, c)
Sleep 5
Next m

End If
i = i + 1
Wend
End Sub
------------------------------------------------------------------------------------------

#excel
#msexcel
#msexceltutorial
#msexcelcourse
#vba
#vbatutorial
#excelvba
#fulltutorial
#excelvbatutorial
#microsoftexceltutorial
#tutorial
#exceltutorial
#advancedexcel
#advancedexceltraining
#tutor
#exceltutor
#exceltutoring
#exceltutoringonline
#onlineexceltutoring
#algorithm
#algorithms
#programming
#program
#script
#vbamacro
#vbamacros
#usingmacro
#veryuseful
#useful
#veryusefulmacro
#freeeducation
#freeprogramming
#freelancer
#excelfreelancer
#vbafreelancer
#freelanceservices
#blinking
#blink
#blinkingcharacters
#blinkingletters
#random
#symbols
#changethecolor