Use VBA to Insert Photos into Excel from URL

  Рет қаралды 40,862

DSMStrength

DSMStrength

Күн бұрын

Пікірлер: 105
@danilobunetto9143
@danilobunetto9143 5 күн бұрын
Hello, great tutorial. I'm using it. Thanks. What changes can I do to use the code to all the rows of a table and jumping the rows without a link?
@lad1s1av7
@lad1s1av7 2 ай бұрын
Excelent video in the term of detailed explanation of what are we doing so it helped me to understand how it works. Big thanks.
@lad1s1av7
@lad1s1av7 2 ай бұрын
I've tried also script to delete pictures as once they are inserted in a document is grows on it's size. But I'm unable to make it work. Tried multiple different scripts and also shape approach but pictures are not deleted, while all the other objects are. Like buttons, charts, etc. Tried even to consult it with ChatGPT but with no result.
@elisehill992
@elisehill992 2 жыл бұрын
This was a success !! Thank you, that was such a helpful video
@DSMStrength
@DSMStrength 2 жыл бұрын
Glad it was helpful!
@romekk3975
@romekk3975 7 ай бұрын
Thank you very much for sharing this. It did work without any issues. I just adapted it to my own code.
@MrErnicoco
@MrErnicoco 3 жыл бұрын
Thanks for video! I was looking for such explanation very long. I really like the way you explain so I can repeat and understand more. I wish you great success
@DSMStrength
@DSMStrength 3 жыл бұрын
Well thank you very much
@daviddiamond4268
@daviddiamond4268 2 жыл бұрын
@@DSMStrength How do I insert the range of cell into the cell b2
@jillhodson524
@jillhodson524 3 жыл бұрын
This was great! I was able to create without any problem. Thank you. Is there a modification needed if the cell range for the pictures has merged cells?
@wadeemaghi4846
@wadeemaghi4846 2 жыл бұрын
it works, thank you! if I need to skip the empty cell and go to the next cell what should I change in the code?
@BboyGraphicx
@BboyGraphicx 2 жыл бұрын
Thank you this was really helpful.
@DSMStrength
@DSMStrength 2 жыл бұрын
awesome!
@miriamfahmi6630
@miriamfahmi6630 2 жыл бұрын
Hi, what a useful tool. Thank you. It does not seem to work for MACs however, any tips?
@DSMStrength
@DSMStrength 2 жыл бұрын
Unfortubately I use pc. Excel for Mac does not function the same way
@gyaninn4587
@gyaninn4587 3 жыл бұрын
You deserve more value 👍 thanks a lot such a lovely module
@DSMStrength
@DSMStrength 2 жыл бұрын
appreciate it thank you
@focused313
@focused313 3 жыл бұрын
This was PERFECT. Thank you.
@DSMStrength
@DSMStrength 3 жыл бұрын
thank you very much for checking out the video
@sultanzone2
@sultanzone2 2 жыл бұрын
Great help Tha Thanks for sharing this
@philippebongrand4259
@philippebongrand4259 3 жыл бұрын
Thanks a lot for this super tutorial ! What can I add to center the photos in the column ? Thanks again for your super explanations !
@DSMStrength
@DSMStrength 2 жыл бұрын
I believe it does center the photos?
@dbknight3
@dbknight3 Жыл бұрын
This is so helpful, thank you so much for doing this! I was wondering though, I was trying to accomplish this with a link to a file in my onedrive. I have a picture file in there that I have shared for everyone and I would like to use it for the image. It is giving me an error. Would there be a different procedure for that?
@vjaska
@vjaska 2 жыл бұрын
Very helpful tutorial, thanks - just one question, is there a way of changing the size of the picture in the VBA code so that the pictures don't reach the sides of the cell the picture is located in?
@DSMStrength
@DSMStrength 2 жыл бұрын
I am sorry I am not sure of a way right now
@vjaska
@vjaska 2 жыл бұрын
@@DSMStrength don't worry, managed to find the answer elsewhere. Thanks though, it was still a useful video
@darkentbg
@darkentbg Жыл бұрын
This is MEGA awesome, is there a way to transport the images to another sheet? I tried to designate a sheet by going Sheets("my sheet name") instead of activesheet, but it doesnt work
@ΓρηγόρηςΚαλαποθαράκος
@ΓρηγόρηςΚαλαποθαράκος Жыл бұрын
great video! how do I massively import images though? I mean what if I have 1000 products? it is impossible to copy-paste 1000 times the URL for each product. thank you very much.
@turnswood
@turnswood 3 жыл бұрын
I've been looking all over for something that does this. I didn't want to copy pictures in and then manipulate them, but from a link, fill in the picture from a link. I'm going to retrieve them from one of my disks, but it's still a hyperlink. Thanks a lot. Irv in Florida
@DSMStrength
@DSMStrength 2 жыл бұрын
glad it helped!!
@Jojosmith342
@Jojosmith342 Жыл бұрын
Excellent. Liked & definately subscribed. Thank you so much for your time to make this video. Could you please kindly teach us how to dynamically load photos from network drive based on user's input. Ex: There are hundreds thousands of products's photos, say user is searching for product #1, photo of this product ID will be loaded automatically from network drive. Thanks a lot for your help
@codyjenkins4376
@codyjenkins4376 3 жыл бұрын
I received a 1004 error that says unable to get the Insert property of the Pictures class. is there an easy fix for this?
@DSMStrength
@DSMStrength 3 жыл бұрын
Make sure that your links are for pictures
@kannanmassey5783
@kannanmassey5783 2 жыл бұрын
Thanks a lot fora helpful vedio.
@novapearls
@novapearls 3 жыл бұрын
Very great tutorial!!! If the link is broken or has no picture is there a code to skip that image and go to the next ? Thank u!!
@DSMStrength
@DSMStrength 3 жыл бұрын
Let me check
@carlbarratt8403
@carlbarratt8403 3 жыл бұрын
@@DSMStrength is there any update as I have the same issue?
@LIMHERST
@LIMHERST 2 жыл бұрын
@@DSMStrength hey! do you have a fix for this? I'm having the same problem. Also - how can I change the range e.g. I have urls in other columns too. Thanks!
@francisliossi2561
@francisliossi2561 3 жыл бұрын
Thanks a lot for this video!! But I still need your help! I'm trying to make the same thing, but using a Google Drive image link. However, i don't know why it doesn't work. Could you please help me?
@DSMStrength
@DSMStrength 2 жыл бұрын
gdrive image link is not the url of a file.. you might be able to get it to work with a sharing link? but you should prob upload file to g-photos
@bakerhasan3093
@bakerhasan3093 3 жыл бұрын
thank you very very very much
@M4N1p
@M4N1p 4 ай бұрын
Great Video - I have one problem. I need my image to fit a merged cell. Any help on how this can be done?
@swerv5254
@swerv5254 Күн бұрын
Hey, it's been 4 months! Did you find a way? I'm trying to do just that
@mofeidyousifhassan7625
@mofeidyousifhassan7625 2 жыл бұрын
Hello! Thank you so much for the video, I have tried it multiple times but it didn’t run for me, it says”can’t execute code in break mode”, may I get some help please via WhatsApp or any other app, that’s convenient for you?, I need this so bad for work, I’ll be so grateful for your help🙏🙏
@iiiiii-w8h
@iiiiii-w8h 2 жыл бұрын
What would happen if you edit one of the urls? What needs to be done in order for the pictures to update accordingly?
@DSMStrength
@DSMStrength 2 жыл бұрын
Delete pics and re run macro
@daniellipkind4276
@daniellipkind4276 3 жыл бұрын
Great content! For some reason mine macro doesn't work as quick. It takes a while to load all the images meanwhile yours took less than a moment. How come? (I use Excel 2016 and each image is less than 50 kb in size)
@DSMStrength
@DSMStrength 3 жыл бұрын
this can be due to several reasons including speed of your computer, other things going on in your spreadsheet, number of rows, number of pictures you are trying to run this script for etc. I kept my spreadsheet really lean for the purposes of the video.
@elektriskietikli8497
@elektriskietikli8497 3 жыл бұрын
Thanks. This vba code is awesome. I add it as a module to my working file with a small modification, but i still can’t modify it to skip text (just text info, not hyperlink) at B4:B100 and load to C4:C100 text when in B cell is text and picture when in B cell is hyperlink.
@roronoa_d_law1075
@roronoa_d_law1075 Жыл бұрын
ActiveSheet.Pictures.Insert(pic) doesn't work for images stored on aws S3 😥 error 1004
@joethecockerspaniel5576
@joethecockerspaniel5576 8 ай бұрын
Is there a way to do the same in MS Word?
@satishbethina123
@satishbethina123 3 жыл бұрын
You can increase font size from tools options
@DSMStrength
@DSMStrength 2 жыл бұрын
yes you can
@JesperBryde-Nielsen
@JesperBryde-Nielsen 11 ай бұрын
It seems that there is some kind of security isse that was not in place when this was made. the 1004 errror that occures has sometthing to do with whether the link is open of not. i tried to open and keep the first 5 pictures open and then run script. That was the script imported the first 5 pictures but stopped after that. You only see the 1004 error if you delete the skip on error line
@davidtc3373
@davidtc3373 3 жыл бұрын
does it work with base64 format? please
@DSMStrength
@DSMStrength 3 жыл бұрын
unfortunately I do not know
@hungbuihuu4006
@hungbuihuu4006 2 жыл бұрын
At first, Thank you so much for sharing a wonderful VBA, however if URL links are not available, VBA returns "Run-time error '1004': Unable to get the Insert property of the Picture class" Do yo have any suggestion to change VBA, in case of facing error links-> step over-> come to next row to insert photos
@lemouga
@lemouga 2 жыл бұрын
Hi Thanks for this I have the same question
@DSMStrength
@DSMStrength 2 жыл бұрын
I can maybe figure something out, TBH this video was a long time ago I would have to go back through the code. I would suggest that you clean up the data ahead of time before running the macro if possible.
@hche6887
@hche6887 Жыл бұрын
Used the VBA code for an Image Template, but does anyone know what code to ADD to handle error if image not found, then proceed to finding the next link?
@websitedownload713
@websitedownload713 3 жыл бұрын
You can use our free screenshot API to securely render an image from any URL of your excel sheet. For example if you need a preview for many links.
@osamasundhu1952
@osamasundhu1952 2 жыл бұрын
Your video really helped me. I just have one request, how can i lock the aspect ratio of the original image so that regardless of how i change the cell size (row and column), the image will only change according to its original aspect ratio. Im doing this so that the rest of the images in each cell that arent all of the same aspect ratio, would not get disproportionate when I have to change the column and row sizes. Also i want to be able to keep the image in the cell from spilling over to the next cell. thanks in advance!
@osamasundhu1952
@osamasundhu1952 2 жыл бұрын
in other words i want the image inserted from the url to be scaled according to its original aspect ratio, so i think it should be locked.
@murattaylanyenigun
@murattaylanyenigun 11 ай бұрын
Thanks, but what if an empty row is there, how the code steps for next instead of stop running
@murattaylanyenigun
@murattaylanyenigun 11 ай бұрын
:) solved by myself, Set rng = Range("c4:c5,c7:c8") , skips the empty row of c6
@Jalaj999
@Jalaj999 3 жыл бұрын
It shows "the picture can't be displayed." In the cell any solutions for this???
@DSMStrength
@DSMStrength 3 жыл бұрын
please make sure your link is correct
@Jalaj999
@Jalaj999 3 жыл бұрын
@@DSMStrength link is correct, but it don't shows the image.
@3pattimodapks
@3pattimodapks 8 ай бұрын
How to show pictures in user form from urls
@ianpdavis
@ianpdavis 3 жыл бұрын
Using this on powerpoint 2016 and it didnt work for me. Double checked the code all seems good - no error messages - just didnt do anything....
@DSMStrength
@DSMStrength 3 жыл бұрын
This is for excel not powerpoint
@ianpdavis
@ianpdavis 3 жыл бұрын
@@DSMStrength sorry I meant excel 2016 - was building a powerpoint pres while I watched. Seemingly cant separate the two words in my head. Any idea what might be the issue ? e.g Permissions etc ?
@DSMStrength
@DSMStrength 3 жыл бұрын
@@ianpdavis make sure that all of your references are correct... that the code is pointing to the right cells from where to get the links.
@vinodsaran1537
@vinodsaran1537 3 жыл бұрын
It flags the following error for me: Run-time error '1004': Unable to get the Insert property of the Picture class What should I do?
@DSMStrength
@DSMStrength 3 жыл бұрын
When you go into the vba what does the error highlight
@SanderGh
@SanderGh 3 жыл бұрын
@@DSMStrength Set myPicture = ActiveSheet.Picutures.Insert(pic)
@jesuseduardobittersuarez7517
@jesuseduardobittersuarez7517 3 жыл бұрын
@@SanderGh same here
@realist9995
@realist9995 3 жыл бұрын
@@SanderGh Same smh...
@maikethomsen4509
@maikethomsen4509 3 жыл бұрын
@@DSMStrength I have the same problem
@AmandaJones-z2p
@AmandaJones-z2p Жыл бұрын
does anyone know how to have an image appear in cell from google drive that is attached to google form?
@pahlevybagoes7050
@pahlevybagoes7050 3 жыл бұрын
How to use local path?
@DSMStrength
@DSMStrength 2 жыл бұрын
should be same way I believe
@lindseyoregon1771
@lindseyoregon1771 3 жыл бұрын
I keep getting an error at .Placement = x1MoveAndSize any Idea why?
@DSMStrength
@DSMStrength 2 жыл бұрын
I believe this has to do with the way your sheet is set up, re check that the urls actually have photos
@osamasundhu1952
@osamasundhu1952 2 жыл бұрын
you wrote x1 instead of xl so change the 1 to l as in L
@aremudavid3368
@aremudavid3368 2 жыл бұрын
I'm getting this error "Sub of Function not defined"
@riyashete7536
@riyashete7536 2 жыл бұрын
Heyy getting same error please reply
@matiasdepalma2948
@matiasdepalma2948 2 жыл бұрын
it gave me Microsoft Visal Basics for Applications 400 (error), im tryng in two differents computers
@shakilash11
@shakilash11 2 жыл бұрын
There is some problem with https link Just change https to http
@jesuseduardobittersuarez7517
@jesuseduardobittersuarez7517 3 жыл бұрын
1004 error dont knmow what to do
@DSMStrength
@DSMStrength 2 жыл бұрын
check your data and make sure it is correct
@2minuteschool929
@2minuteschool929 3 жыл бұрын
👍👍
@DSMStrength
@DSMStrength 3 жыл бұрын
thank you
@muhammadjamshed2128
@muhammadjamshed2128 2 жыл бұрын
Not working please again
@SoyPijamas
@SoyPijamas 3 жыл бұрын
I need help,. this doesn't works
@DSMStrength
@DSMStrength 3 жыл бұрын
I assure you it does work, if you have entered the code correctly and your links are appropriate. Make sure you make any necessary modifications to fit your spreadsheet
@muhammadjamshed2128
@muhammadjamshed2128 2 жыл бұрын
Below code has no error but haven't show the results why? Sub insertimagevideo() Dim pic As String Dim mypicture As Picture Dim rng As Range Dim item As Range Set rng = Range("c1:c3") For Each item In rng pic = item.Offset(0, -1) If pic = "" Then Exit Sub Set mypicture = ActiveSheet.Pictures.Insert(pic) With mypicture .ShapeRange.LockAspectRatio = msoFalse .Width = item.Width .Height = item.Height .Top = Rows(item.Row).Top .Left = Columns(item.Column).Left .Placement = xlMoveAndSize End With Next End Sub
@Evermysticdesigns
@Evermysticdesigns 2 жыл бұрын
My code stopped at Set myPicture = ActiveSheet.Pictures.Insert(Pic) and then nothing happened , what did i do wrong ? Sub InsertImageVideo() Dim Pic As String Dim myPicture As Picture Dim rng As Range Dim item As Range Set rng = Range("d2:d100") For Each item In rng Pic = item.Offset(0, -1) If Pic = "" Then Exit Sub Set myPicture = ActiveSheet.Pictures.Insert(Pic) With myPicture .ShapeRange.LockAspectRatio = msoFalse .Width = itemWidth .Height = itemHeight .Top = Rows(item.Row).Top .Left = Columns(item.Column).Left .Placement = xlMoveAndSize End With Next End Sub
@Evermysticdesigns
@Evermysticdesigns 2 жыл бұрын
error was: Unable to get the insert property of the Picture class
@khajornpatrungprasitporn3972
@khajornpatrungprasitporn3972 Жыл бұрын
I get same the problem. that "Runtime error '1004'" and debug stop at the same your process. I already check the url of picture are ok. Please help me for this problem. and thank you for your video and your feed back.
@Pedroffs
@Pedroffs 2 жыл бұрын
Hello, Great explenation! Could you share your code? I am running the below code buy getting the Runtime error 1004. Any help? Sub InsertImageVideo() Dim pic As String Dim myPicture As Picture Dim rng As Range Dim item As Range Set rng = Range("h3:h10") For Each item In rng pic = item.Offset(0, -1) If pic = "" Then Exit Sub Set myPicture = ActiveSheet.Pictures.Insert(pic) With myPicture .ShapeRange.LockAspectRatio = msoFalse .Width = item.Width .Height = item.Height .Top = Rows(item.Row).Top .Left = Columns(item.Column).Left .Placement = xlMoveAndSize End With Next End Sub
Python in Excel vs. VBA - What You Should Learn in 2024!
10:05
David Langer
Рет қаралды 65 М.
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 7 МЛН
Learn Excel MACROS in 10 Minutes Using Real World Examples
9:13
Kenji Explains
Рет қаралды 1,1 МЛН
VBA to BROWSE & COPY Data from SELECTED File in Excel
10:00
Leila Gharani
Рет қаралды 335 М.
How to get the Last Row in VBA(The Right Way!)
15:41
Excel Macro Mastery
Рет қаралды 165 М.
You'll NEVER want to be SMART ever again: Schopenhauer's Secret
8:06
PhiloNautica
Рет қаралды 651 М.
FREE Tool to Automate Your Repetitive and Boring Tasks | AutoHotkey
16:12
How to Easily Create an Data Entry Form in Excel | No VBA
22:30
Jopa Excel
Рет қаралды 48 М.
Excel VBA to Insert Picture into Cell and Resize Picture to fit into Cell
9:15
Insert All Pictures In Folder Excel VBA Macro
5:50
Excel Macro Mania
Рет қаралды 6 М.