Duane

Duane

  • NA
  • 77
  • 0

Listbox to existing Excel

Dec 5 2012 12:44 AM
I am trying to get the results from a listbox into an existing Excel file. I have googled extensively, but I don't seem to be able to come up with anything from a .NET basis. I will show you what I have (primitive and incomplete). Please give me a direction to follow.

Dim xlApp As New Excel.Application
Dim xlWkBook = xlApp.Workbooks.Open("C:\NFL_2012.xls")
Dim xlWkSheet = xlWkBook.Worksheets("Sheet_1")
    xlWkSheet.Range("A1").Value = ListBox10.Items.Item(0)
    xlWkSheet.Range("B1").Value = ListBox10.Items.Item(1)

Answers (3)