I am generating Excel reports for my company using VB.NET programming but have a problem when inserting an image into the spreadsheet and attempting to position it within the sheet.

Please see my code snippet:

'Specify cell range for logo and insert the image
oRng = osheet.Range("A1")

oexcel.ActiveSheet.Pictures.Insert(Application.StartupPath & "\logo.gif").select()

oRng is my Excel.Range object. As you can see, I am trying to select the 1st cell in the spreadsheet to position my picture but instead I just keep getting it positioned where it wants to put it with the empty cell being selected. (Not what I really want)

Is anyone here familiar with Excel programming in VB.NET that could advise me of a solution or point me in the right direction if I'm in the wrong place???

I would REALLY appreciate the help!

9 Years
Discussion Span
Last Post by lee_suko
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.