mrbungle 29 Junior Poster in Training

In my form I have a graphic in a picturebox- simple stuff. My application prints a bunch of stuff to an Excel file- everything works perfectly with no problems.

I need the image in the picturebox to print to the Excel sheet. I've tried a ton of code but nothing works. Here's the latest version.

Public myFolder As String = "C:\Program Files\DailyLog\"
Public myLogoImage As String = myFolder & "logo.png"
Dim myLogoImage As Image = Image.FromFile(myFolder & "logo.png")
.Range("C1").Image = myLogoImage

There's no errors, but the image doesn't get printed.

I suspect it *might* have something to do with the image in the picturebox needing to be released because it's currently in use by the app- would that make sense?

Does anyone have any ideas on this?

TIA

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.