Results 1 to 20 of 23

Thread: Replace text in cell with picture (or insert picture into same cell)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #14
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,476
    Location
    Haven't got your file but try this. Pics can be inserted using Events or called by propagate code
    Sub AddPics(ws)
        Dim c As Range, i As Long
        For i = 1 To 9
            Set c = ws.Cells.Find("z." & i, lookat:=xlWhole)
            If Not c Is Nothing Then
                Sheets("Pics").Shapes("Picture " & i).Copy
                c.PasteSpecial xlPasteAll
            End If
        Next i
    End Sub
    Attached Files Attached Files
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Tags for this Thread

Posting Permissions

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