Insert Animated Gif Picture to Userform Using Excel VBA

Опубликовано: 27 Октябрь 2024
на канале: The World Of Algorithms
5,317
like

First, the library must be activated:

Step 1. Open the Toolbox
Step 2. Click Additional Controls
Step 3. Scroll down the list, tick the ieframedll.dll checkbox and click OK

Let's write the process in full form on 1 line:

Insert ➡ UserForm1 ➡ View ➡ Toolbox ➡ Rigth Click (Controls tab) ➡ Additional Controls ➡ Microsoft Web Browser

--------------------
--------------------
Const g_path As String = "C:\Users\User\Desktop\Gif\Gif"

Private Sub UserForm_Activate()
Dim i As Byte

With Me
.Left = Application.Left
.Height = Application.Height
.Width = Application.Width
.Top = Application.Top
End With

i = 1
Do
Controls("web" & i).Navigate (g_path & i & ".gif")
i = i + 1
Loop Until i ▶ 5

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
#excelvbaimage
#vbaimage
#imagecontrol
#excelvbaimagecontrol
#userformimagecontrol
#gif
#animatedgif
#insertanimatedgif
#userformanimatedgif
#userforcontrol
#vbacontrols
#excelvbaanimatedgif
#webbrowser
#excelvbawebbrowser
#microsoftwebbrowser
#ieframedll
#excelvbaieframedll