Macro Insert Picture Not Work Link File

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,102
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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,226,117
Messages
6,189,061
Members
453,524
Latest member
AshJames

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