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.
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
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?
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?
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?
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.
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
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
@@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!
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?
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🙏🙏
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)
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.
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.
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
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
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.
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?
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!
@@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 ?
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
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)
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)
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.
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)
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?
Excelent video in the term of detailed explanation of what are we doing so it helped me to understand how it works. Big thanks.
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.
This was a success !! Thank you, that was such a helpful video
Glad it was helpful!
Thank you very much for sharing this. It did work without any issues. I just adapted it to my own code.
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
Well thank you very much
@@DSMStrength How do I insert the range of cell into the cell b2
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?
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?
Thank you this was really helpful.
awesome!
Hi, what a useful tool. Thank you. It does not seem to work for MACs however, any tips?
Unfortubately I use pc. Excel for Mac does not function the same way
You deserve more value 👍 thanks a lot such a lovely module
appreciate it thank you
This was PERFECT. Thank you.
thank you very much for checking out the video
Great help
Tha Thanks for sharing this
Thanks a lot for this super tutorial !
What can I add to center the photos in the column ?
Thanks again for your super explanations !
I believe it does center the photos?
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?
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?
I am sorry I am not sure of a way right now
@@DSMStrength don't worry, managed to find the answer elsewhere. Thanks though, it was still a useful video
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.
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
glad it helped!!
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
I received a 1004 error that says unable to get the Insert property of the Pictures class. is there an easy fix for this?
Make sure that your links are for pictures
Thanks a lot fora helpful vedio.
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!!
Let me check
@@DSMStrength is there any update as I have the same issue?
@@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!
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?
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
thank you
very very very much
Great Video - I have one problem. I need my image to fit a merged cell. Any help on how this can be done?
Hey, it's been 4 months! Did you find a way? I'm trying to do just that
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🙏🙏
What would happen if you edit one of the urls? What needs to be done in order for the pictures to update accordingly?
Delete pics and re run macro
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)
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.
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.
ActiveSheet.Pictures.Insert(pic) doesn't work for images stored on aws S3 😥
error 1004
Is there a way to do the same in MS Word?
You can increase font size from tools options
yes you can
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
does it work with base64 format? please
unfortunately I do not know
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
Hi Thanks for this I have the same question
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.
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?
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.
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!
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.
Thanks, but what if an empty row is there, how the code steps for next instead of stop running
:) solved by myself, Set rng = Range("c4:c5,c7:c8") , skips the empty row of c6
It shows "the picture can't be displayed." In the cell any solutions for this???
please make sure your link is correct
@@DSMStrength link is correct, but it don't shows the image.
How to show pictures in user form from urls
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....
This is for excel not powerpoint
@@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 ?
@@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.
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?
When you go into the vba what does the error highlight
@@DSMStrength Set myPicture = ActiveSheet.Picutures.Insert(pic)
@@SanderGh same here
@@SanderGh Same smh...
@@DSMStrength I have the same problem
does anyone know how to have an image appear in cell from google drive that is attached to google form?
How to use local path?
should be same way I believe
I keep getting an error at .Placement = x1MoveAndSize any Idea why?
I believe this has to do with the way your sheet is set up, re check that the urls actually have photos
you wrote x1 instead of xl so change the 1 to l as in L
I'm getting this error "Sub of Function not defined"
Heyy getting same error please reply
it gave me Microsoft Visal Basics for Applications
400 (error), im tryng in two differents computers
There is some problem with https link Just change https to http
1004 error dont knmow what to do
check your data and make sure it is correct
👍👍
thank you
Not working please again
I need help,. this doesn't works
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
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
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
error was: Unable to get the insert property of the Picture class
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.
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