hi
I have master emp file in excel , total 500 employee records like name, emp no, contact no etc.,i want to know how can i get picture if i put the emp no against the picture
Picture are saved in my d:\ drive
Pls some one help
hi
I have master emp file in excel , total 500 employee records like name, emp no, contact no etc.,i want to know how can i get picture if i put the emp no against the picture
Picture are saved in my d:\ drive
Pls some one help
Try this example.
![]()
Public Sub LoadPicture() '# '# declarations '# Dim lngRowNumber As Long '# '# loop for all employee entries on the current worksheet and for each employee, '# insert the photo of that employee in column D on the same row using the '# employee number in column A '# With ActiveSheet For lngRowNumber = 2 To .Cells(.Rows.Count, "A").End(xlUp).Row With .Pictures.Insert("D:\" & .Cells(lngRowNumber, "A").Value & ".jpg") .Top = ActiveSheet.Rows(lngRowNumber).Top .Left = ActiveSheet.Columns("D").Left End With Next lngRowNumber End With End Sub
If you like my contribution click the star icon!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks