💡 Source Code
Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal ms&)
Private Sub CommandButton1_Click()
Dim i As Integer
CommandButton1.Enabled = 0
With Label1
If .Caption = "N" Then
For i = 48 To 30 Step -1
DoEvents
CommandButton1.Left = i
Sleep 1
Next i
UserForm1.Picture = LoadPicture("")
.Caption = "Q"
.ForeColor = vbBlue
Else:
For i = 30 To 48
DoEvents
CommandButton1.Left = i
Sleep 1
Next i
UserForm1.Picture = LoadPicture(Environ("userprofile") + "\Desktop\Theme\night.jpg")
.Caption = "N"
.ForeColor = vbYellow
End If
End With
CommandButton1.Enabled = -1
End Sub
------------------------------------------------------------------------------------------
Buy a Cofee ☕ for theworldofalgorithms: https://ko-fi.com/theworldofalgorithms
🥰Thank you for the donation. I am deeply grateful for your help!🥰
------------------------------------------------------------------------------------------
#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
#vbauserform
#excelvbauserform
#daymode
#nightmode
#dayandnightmode
#excelvbadaymode
#excelvbanightmode