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

Add data to combox Excel

P: 3
Hello
I am creating an application with Visual Studio 2010, in my application I need to make a report in Excel and in that report I want to add a combobox with some data, I add the combobox to my excel sheet with the next code:
Expand|Select|Wrap|Line Numbers
  1. Dim xlApp As Excel.Application
  2.         Dim xlBook As Excel.Workbook
  3.         Dim xlSheet As Excel.Worksheet
  4.         Dim xllistbox As Excel.OLEObject
  5.         xlApp = New Excel.Application
  6.         xlBook = xlApp.Workbooks.Add
  7.         xlSheet = xlBook.ActiveSheet
  8.         xllistbox = xlSheet.OLEObjects.add(classtype:="forms.combobox.1")
  9.         xlApp.VBE.MainWindow.Visible = False
  10. xlApp.Visible = True
  11.     End Sub
  12.  
But I don’t know how to add the data to my combobox, thanks for your help and time
Jun 15 '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.