• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel VBA Print listbox items with image

Nu2Java

Member
Hi All - I am using this code to print all items from a listbox that come from searching multiple files for a string. Once the listbox populates, I have an image load that goes with the search. How can I include the image with what prints out?

Code:
Private Sub PrintList_Click()

    With ThisWorkbook.Sheets("listbox")
      For i = 0 To Me.ListBox1.ListCount - 1
         .Cells(i + 1, "A").Value = Me.ListBox1.Column(0, i)
      Next i
      
      .PrintOut
 
  End With
 
  Sheets("listbox").Cells.ClearContents
 
End Sub
 
I think that's how it will be. I also spent a long time tinkering with the same problem when loading an image of a horseshoe that I found on the depositphotos website. But I just didn’t understand what the problem was, everything somehow went away!
 
Last edited by a moderator:
Back
Top