Macro Insert Picture Not Work Link File

muhammad susanto

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

how to make this macro code worked...:

Code:
Dim cf1, cf2, cf3, cf4 As String

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.Count > 1 Or IsEmpty(Target) Or (Target.Column <> 37 And Target.Row <> 10) Then
        Exit Sub
    Else
         sisipfoto
    End If
End Sub
Sub sisipfoto()
cf1 = "c:\f_bg2a\" & Range("ak10:AK10") & "a.jpg"
cf2 = "c:\f_bg2a\" & Range("ak10:AK10") & "b.jpg"
cf3 = "c:\f_bg2a\" & Range("ak10:AK10") & "c.jpg"
cf4 = "c:\f_bg2a\" & Range("ak10:AK10") & "d.jpg"
Image1.Picture = LoadPicture(cf1)
Image2.Picture = LoadPicture(cf2)
Image3.Picture = LoadPicture(cf3)
Image4.Picture = LoadPicture(cf4)
End Sub

i have tried, but not working..The picture not showing...
have you any idea?

m.susanto
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

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