By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,022 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Embedding a Resource into Excel in vb.net

P: 1
I'm trying to embed a resource into excel using the following code but getting the "Public member 'Picture' on type 'worksheet' not found. Her is the Code:

Expand|Select|Wrap|Line Numbers
  1. Sub GetSBUTab()
  2.  
  3.         Dim row As Integer = 1
  4.         Dim myAssembly = System.Reflection.Assembly.GetExecutingAssembly()
  5.         Dim myStream = myAssembly.GetManifestResourceStream("WindowsApplication1.SBU.jpg")
  6.         Dim image As New Bitmap(myStream)
  7.  
  8.  
  9.         StatusLabel.Text = "Building SBU..."
  10.         WS = WB.Worksheets.Add(After:=WB.Worksheets(3))
  11.  
  12.         WS.Name = "SBU"
  13.  
  14.         WS.PageSetup.CenterHeader = "SENSITIVE BUT UNCLASSIFIED (SBU) - NASA SENSITIVE"
  15.         WS.PageSetup.CenterFooter = "SENSITIVE BUT UNCLASSIFIED (SBU) - NASA SENSITIVE"
  16.  
  17.         Me.ClientSize = New Size(image.Width, image.Height)
  18.  
  19.         WS.Range("A1").Select()
  20.         WS.Cells(row, 1) = WS.picture.insert(image)
  21.  
  22.  
  23.     End Sub
Dec 13 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.