M
mindscape777
Hi.
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")
oRng.Cells.Select()
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!
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")
oRng.Cells.Select()
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!