VBA : Vlookup Data Pictures Not Fully Work to Picture 2

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,102
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hi all...

i'm looking for how to solved this code...
this macro working well to data lookup pictures. Only 1 picture can work but can't work to picture 2
how to make fit it?

here this code :
Sub ReplaceImages()
<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;"> If Range("AM8") = "" Then Exit Sub
Dim MyPic As String
For i = 1 To 2
MyPic = "G:\foto_2page" & Range("AM8").Value & "_" & i & ".jpg"
With Me.Shapes("Pic_" & i).Fill
.Visible = msoTrue
On Error Resume Next
.UserPicture MyPic
End With
Next i
End Sub
Private Sub CommandButton1_Click()
ReplaceImages </code>End Sub


across post
https://www.excelforum.com/excel-programming-vba-macros/1245016-picture-2-cant-change-in-the-next-picture-or-record.html

my target in sheet "Form_Bgn and my data in sheet "Bangunan"


any help greatly appreciated....

.sst.

 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,224,879
Messages
6,181,531
Members
453,054
Latest member
ezzat

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top