Copy image from a userform to a cell

Solved
Hello,

I’d like to copy an image inserted in a userform into a cell, but I don’t know how?

Thank you.

4 answers

  1. Thank you, but despite your help I still don’t understand how to cut out the image from the userform and paste it into a cell.
    0
    1. here is a part of my code

      ww = mn & 5 & aw + 3

      Set b = VBA.UserForms.Add(ww)

      If b.Image1.Tag <> "" Then

      Workbooks("Formulaire.xlsm").Worksheets("ajdonne").Pictures.Insert(b.Image1.Tag).Select

      Selection.Top = Range("k1").Top
      Selection.Left = Range("k1").Left

      End If

      If b.Image2.Tag <> "" Then

      Workbooks("Formulaire.xlsm").Worksheets("ajdonne").Pictures.Insert(b.Image2.Tag).Select

      Selection.Top = Range("k25").Top
      Selection.Left = Range("k25").Left

      End If

      Private Sub CommandButton2_Click()

      (...)

      Me.Image1.Picture = LoadPicture(FichImg)

      Me.Image1.Tag = FichImg

      (...)

      end sub

      ww is the name of the existing userform (verified)
      0
      1. Re,

        this part works without problems

        [code block preserved as is in the original]

        Please detail a little more what is not going right !!!!!!!!!!!!!!!!!!!!

        See you soon
        0