Ernest Ansah
New Member
- Joined
- Oct 12, 2022
- Messages
- 12
- Office Version
- 2019
- Platform
- Windows
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$7" Then
If Sheet14.Range(Target.Address) = "1" Then Sheet14.image1.picture = LoadPicture("C:\Users\Public\Pictures\1.jpg")
If Sheet14.Range(Target.Address) = "2" Then Sheet14.image1.picture = LoadPicture("C:\Users\Public\Pictures\2.jpg")
ElseIf Sheet14.image1.picture = LoadPicture("C:\Users\Public\Pictures\"".jpg") Then Sheet14.image1.picture = LoadPicture("C:\Users\d\AppData\Roaming\BS1 PHOTO\BLANK.jpg")
end if
end sub
please help me correct the error. Thank You
If Target.Address = "$B$7" Then
If Sheet14.Range(Target.Address) = "1" Then Sheet14.image1.picture = LoadPicture("C:\Users\Public\Pictures\1.jpg")
If Sheet14.Range(Target.Address) = "2" Then Sheet14.image1.picture = LoadPicture("C:\Users\Public\Pictures\2.jpg")
ElseIf Sheet14.image1.picture = LoadPicture("C:\Users\Public\Pictures\"".jpg") Then Sheet14.image1.picture = LoadPicture("C:\Users\d\AppData\Roaming\BS1 PHOTO\BLANK.jpg")
end if
end sub
please help me correct the error. Thank You