Click here to Skip to main content
15,888,253 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: A C# DLL produce error on VB.net project Pin
dilkonika2-Feb-15 9:10
dilkonika2-Feb-15 9:10 
GeneralRe: A C# DLL produce error on VB.net project Pin
dilkonika2-Feb-15 9:14
dilkonika2-Feb-15 9:14 
GeneralRe: A C# DLL produce error on VB.net project Pin
dilkonika2-Feb-15 9:15
dilkonika2-Feb-15 9:15 
GeneralRe: A C# DLL produce error on VB.net project Pin
Richard Deeming2-Feb-15 9:29
mveRichard Deeming2-Feb-15 9:29 
GeneralRe: A C# DLL produce error on VB.net project Pin
dilkonika2-Feb-15 9:56
dilkonika2-Feb-15 9:56 
GeneralRe: A C# DLL produce error on VB.net project Pin
Richard Deeming2-Feb-15 10:05
mveRichard Deeming2-Feb-15 10:05 
GeneralRe: A C# DLL produce error on VB.net project Pin
dilkonika2-Feb-15 9:59
dilkonika2-Feb-15 9:59 
QuestionMicrosoft.Office.Interop.Excel.Application and pictures Pin
jkirkerx2-Feb-15 8:11
professionaljkirkerx2-Feb-15 8:11 
First off, I have no clue how to use Excel. I can write a formula, but I'm not the Excel Guru.
I want to embed the pictures in the cells within the file, plus make the picture smaller and center it in the cell.

So I'm using this now, which adds the picture, but I can't resize the picture; so I made the row taller. But I'm not sure if the picture travels with the file.

Any insight would be helpful.

Dim range_image As Range = ws.Range("A" & rC, "A" & rC)
range_image.Select()

Dim pic As Microsoft.Office.Interop.Excel.Pictures = CType(ws.Pictures(oMissing), Microsoft.Office.Interop.Excel.Pictures)
pic.Insert(appData & lvRecords(idx).sItemImage, oMissing)
'pic.Width = range_image.Width
'pic.Height = range_image.Height

And then I have this code, which makes the file size larger, so I'm thinking that the image is embedded. I thought I could add the shape to the cell, but I get a exception.

It didn't like it.
Dim shape As Shape = ws.Shapes.AddPicture(
     appData & lvRecords(idx).sItemImage,
     Microsoft.Office.Core.MsoTriState.msoFalse,
     Microsoft.Office.Core.MsoTriState.msoCTrue,
     0,
     0,
     25,
     25
)
ws.cells("A1", "A1") = Shape

AnswerRe: Microsoft.Office.Interop.Excel.Application and pictures Pin
Kenneth Haugland3-Feb-15 8:14
mvaKenneth Haugland3-Feb-15 8:14 
General[Heading over to the Microsoft Forum for this] Pin
jkirkerx3-Feb-15 9:24
professionaljkirkerx3-Feb-15 9:24 
QuestionEntity Framework : Filter child entities Pin
dilkonika31-Jan-15 7:15
dilkonika31-Jan-15 7:15 
AnswerRe: Entity Framework : Filter child entities Pin
Kenneth Haugland31-Jan-15 21:35
mvaKenneth Haugland31-Jan-15 21:35 
GeneralRe: Entity Framework : Filter child entities Pin
dilkonika1-Feb-15 5:02
dilkonika1-Feb-15 5:02 
AnswerRe: Entity Framework : Filter child entities Pin
Kenneth Haugland1-Feb-15 19:09
mvaKenneth Haugland1-Feb-15 19:09 
GeneralRe: Entity Framework : Filter child entities Pin
dilkonika2-Feb-15 4:45
dilkonika2-Feb-15 4:45 
GeneralRe: Entity Framework : Filter child entities Pin
Kenneth Haugland2-Feb-15 4:55
mvaKenneth Haugland2-Feb-15 4:55 
GeneralRe: Entity Framework : Filter child entities Pin
dilkonika2-Feb-15 5:13
dilkonika2-Feb-15 5:13 
QuestionOverriding events in an inherited Control Pin
Sam Marrocco30-Jan-15 9:20
Sam Marrocco30-Jan-15 9:20 
AnswerRe: Overriding events in an inherited Control Pin
Mycroft Holmes1-Feb-15 11:59
professionalMycroft Holmes1-Feb-15 11:59 
QuestionUpdate a database structure according to a model Pin
dilkonika29-Jan-15 18:16
dilkonika29-Jan-15 18:16 
AnswerRe: Update a database structure according to a model Pin
Richard Deeming30-Jan-15 1:26
mveRichard Deeming30-Jan-15 1:26 
GeneralRe: Update a database structure according to a model Pin
dilkonika30-Jan-15 18:07
dilkonika30-Jan-15 18:07 
AnswerRe: Update a database structure according to a model Pin
Mycroft Holmes30-Jan-15 13:44
professionalMycroft Holmes30-Jan-15 13:44 
GeneralRe: Update a database structure according to a model Pin
dilkonika30-Jan-15 18:16
dilkonika30-Jan-15 18:16 
GeneralRe: Update a database structure according to a model Pin
Mycroft Holmes31-Jan-15 21:09
professionalMycroft Holmes31-Jan-15 21:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.