Posts by Yuvi0007

    yes.....you provided code.

    but that is different. Where I am adding photos from user form to excel.


    But this thread is different..in this, I am calling images from folder to excel based on cell "A" value..my code is working but I am not able to add a static image/shapes.addpicture.

    I have few photos with Names and saved in one folder. also i have excel where Photos Names are in Cell"A" and i want to map these photos in Cell "B" (copy paste). i can able to do it by above code but once i move excel or photos it giving error "The linked image cannot be displayed. the file may have been moved, renamed, or deleted verify that the link points the correct file and location"

    so if there is any other code to paste photos in cell"B" based on Cell "A" Values ?

    Hi.

    need solution on below code .

    ex: If i type xyz in cell "A" the code has to call xyz image from folder and paste in cell "B"

    I am using below code but once I move excel or delete photos form folder showing error.The linked image cannot be displayed. the file may have been moved, renamed, or deleted verify that the link points the correct file and location"

    Can we modify below code by Shapes.AddPicture Or any other static image code ?


    Thanks Rory .. The code is working fine without error ... Thank you .


    my one more query ?

    can i add the image in this position cell "B"

    Ex;

    Code
    Option Explicit
    Dim fpath As String
    Private Sub Save_Click()
    Dim x As Long
    Dim Y As Worksheet
    Set Y = Sheets("Data1")
    x = Y.Range("A" & Rows.Count).End(xlUp).Row
    With Y
    .Cells(x + 1, "A").Value = TextA.Text
    .Cells(x + 1, "B").Image =sht.Shapes.AddPicture p, msoFalse, msoTrue, ActiveCell.Left, ActiveCell.Top, -1, -1

    In cell "B" ?

    Code
    .Cells(x + 1, "B").Image = sht.Shapes.AddPicture p, msoFalse, msoTrue, ActiveCell.Left, ActiveCell.Top, -1, -1

    Really Great solution .... It's inserting image from userform to Excel.

    by using below code I tried my best to insert image in particular cell but I am fail.

    Ex; value Text A is pasting in cell A but I tried to insert picture in B but when i modified program its showing Error.

    The Code works fine if i want the image only in excel... but i want Image in Cell B

    any solution ?

    I tried in different way but showing Error

    ex: below line

    Code
    .Cells(x + 1, "B").Paste = TransferToSheet Me.Image1, ActiveWorkbook.Sheets(1)

    Hi...Thank for Code.

    I used above code but its help to only copy paste.

    Actually Buy using below code based on cell [A:A] value i can able to auto call image from file and inserting in next cell in excel.

    ex: If I Type 0007 in cell A1 then micro check for image in file, name 0007.JPG and it Inserts it in Cell B1.

    But Problem is, it's Dynamic image , Once i delete photo from file/Folder or if i move a Excel in another location the Cell B1 image will Disapperse with box in Cell B1 as "picture cannot be displayed unlinked or deleted "

    Any solution Instead of insert can we insert as copy , Paste as static image in excel , so i can move the excel any folder or location.

    By changing text in cell the image has to paste from file.I used below Code it's working fine But once you delete the images from file then the image from excel disappears and showing error. Is it any option instead of Insert can we auto paste in excel.