Results 1 to 4 of 4

Insert Picture In Cell By Matching Employee ID

Threaded View

  1. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: Insert Picture In Cell By Matching Employee ID

    If anyone needs help with the same issue -

    Sub InsertPics()
            
        On Error Resume Next
            
        Dim Cell As Range, EmpID As String
        Const Path As String = "E:\Deep Dave\Excel Sheets\Survey\Photographs\"
        
        Application.ScreenUpdating = False
        
        For Each Cell In Range("Rng")
        
            If Len(Cell.Value) = 4 Then
                Cell.Select
                EmpID = Cell.Value + 0
                ActiveSheet.Pictures.Insert(Path & EmpID & ".jpg").Select
                With Selection
                    .Placement = xlMoveAndSize
                    .ShapeRange.LockAspectRatio = msoFalse
                    .ShapeRange.Height = ActiveCell.Height
                    .ShapeRange.Width = ActiveCell.Width
                    .ShapeRange.Name = Cell.Value
                End With
            End If
            
        Next Cell
    
        Application.ScreenUpdating = True
        
    End Sub
    Last edited by NeedForExcel; 09-03-2015 at 05:53 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Matching two employee directories, and adding the Employee #
    By sevanseriesta in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-26-2015, 01:58 PM
  2. [SOLVED] Insert Picture in cell, click commanbutton to rename picture, lock cell and remove button
    By thecdnmole in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-28-2014, 10:05 PM
  3. Insert Picture To Cell in Col A with pic name in Col B
    By EBTI in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-07-2014, 07:57 AM
  4. How to insert a picture into a cell
    By VickiFletcher in forum Excel General
    Replies: 3
    Last Post: 04-28-2014, 10:29 AM
  5. VBA for Picture insert at particular worksheet range. Picture name derived from cell.
    By Douglas2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-09-2013, 01:16 AM
  6. Insert picture when cell changes
    By Rookie_User in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-22-2006, 03:45 AM
  7. [SOLVED] how can I insert a picture in a cell
    By yakmelk in forum Excel General
    Replies: 2
    Last Post: 11-03-2005, 04:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1