I Want to insert all listed Gifs from a folder into Spreadsheet, then by selecting a Gif, and then by clicking the command button in the sheet an user Form should pop-up and display the Gif.
I tried to display the Gif directly in the userform using Webbrowser object. It was working. But i dont know how to do this one.
Code I used to display GIF in UserForm,
Private Sub UserForm_Activate()
WebBrowser1.Navigate2 (ActiveWorkbook.Path & "\" & "1.gif")
'WebBrowser1.Document.Body.Scroll = "no"
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
.width = 1024
.Height = 768
.Document.Body.Scroll = "No"
In this I directly encoded the Gif name, but now i want to do it more interactive way.
1. Insert Gif into Spreadsheet.
2.Select the Gif manually.
3.Click command button
4. An user form needs to display the Gif.
Kindly Let me know is it possible. also do share some code snippets that will be really helpful.
Thanks in advance.