Kayıtların üzerinde gezerken personelin resminin gelmesi yada Excel Sayfasında form üzerinde
İsteyen kişilerin kullanması içindir.
İsteyen kişilerin kullanması içindir.
Kod:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Err GoTo sonhata1
Dim sut As Integer
Dim sat As Integer
Dim a As Integer
sut = Selection.Cells.Column
sat = Selection.Cells.Row
Image2.PictureSizeMode = fmPictureSizeModeStretch
If IsError(Range("B" & sat).Value) Then
Exit Sub
End If
If Dir$(ThisWorkbook.Path & "\perresim\" & Range("B" & sat).Value & ".jpg") = "" Then
Image2.Visible = False
Exit Sub
Else
Image2.Visible = True
Image2.Picture = LoadPicture(ThisWorkbook.Path & "\perresim\" & Range("B" & sat) & ".jpg")
End If
Exit Sub
sonhata1:
Exit Sub
Resume
End Sub
