Results 1 to 3 of 3

Thread: Gembox Excel and Listboxes not getting along

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2012
    Posts
    16

    Question Gembox Excel and Listboxes not getting along

    I am currently using Gembox to pass text to excel and I have a problem. I have imported the required resources but when I try to pass an item in a list box it comes to an error... here's my code
    Code:
    'checkrow is a number loaded from that same excel
    Dim ef As ExcelFile = New ExcelFile
    ef.LoadXls("C:\Users\DF\Desktop\registro_prestamos.xls")
    Dim ws As ExcelWorksheet = ef.Worksheets(0)
    checkrow = (ws.Cells("F2").Value.ToString())
     
    'numrent is a number to keep track of which item to load
    ws.Cells("B" + (Str(checkrow).Trim)).Value = listbox.Items(numrent).Value.ToString
    it throws an error stating "Public member 'Value' on type 'String' not found." Any ideas why?

  2. #2
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,713

    Re: Gembox Excel and Listboxes not getting along

    There is no member Value, use the following.

    Code:
    Listbox1.Items(numrent).ToString
    Also best to set Option Strict to On.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2012
    Posts
    16

    Re: Gembox Excel and Listboxes not getting along

    Thanks! worked Great!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width