Hi Everyone,
I a folder with 200 bmp picture and 200 image shape in sheet1.All images were named as Image1,Image2.... etc. now I would like to insert the picture into those image shapes like, for image1 load ...1.bmp, for image2 load ....2.bmp and so on.
I know how to add pictures if that images in the user form. But adding pictures to activesheet shapes gives me an error all the time. So far my code is below
'____
For i = 1 To 18
On Error Resume Next
ActiveSheet.Shapes("Image" & i).Picture = LoadPicture(ThisWorkbook.Path & "\Pictures\" & i & ".BMP")
Next i
'________
But why it's not working any idea?
Thanks in advance
baha
I a folder with 200 bmp picture and 200 image shape in sheet1.All images were named as Image1,Image2.... etc. now I would like to insert the picture into those image shapes like, for image1 load ...1.bmp, for image2 load ....2.bmp and so on.
I know how to add pictures if that images in the user form. But adding pictures to activesheet shapes gives me an error all the time. So far my code is below
'____
For i = 1 To 18
On Error Resume Next
ActiveSheet.Shapes("Image" & i).Picture = LoadPicture(ThisWorkbook.Path & "\Pictures\" & i & ".BMP")
Next i
'________
But why it's not working any idea?
Thanks in advance
baha