Retrieve data from ComboBoxcell

Posted by: stephc on 8 September 2017, 3:14 pm EST

  • Posted 8 September 2017, 3:14 pm EST

    It is easy to put data in a cell type ComboBox

    Like this for example:

    Dim LMG() As String = {"A", "B", "C", "D"}
    Dim MyCeLL As New CellType.ComboBoxCellType
    MyCeLL.Items = LMG
    MyCeLL .Editable = True
    MyFP.Sheets(0).Cells(1,1).CellType = MyCeLL

    And i save the grid.


    But later, when I want to extract all the data from this comboBox, I can not do:

    Dim LMG() As String
    Dim MyCeLL As CellType.ComboBoxCellType = MyFP.Sheets(0).Cells(1, 1).CellType (.Cell(1,1) is a good ComboBoxCelltype)


    MyCell always have "Nothing" value

    and, of course, LMG = MyCeLL.Items don't work


    What's wrong?


    Thank You

    Stephane
  • Marked as Answer

    Replied 8 September 2017, 3:14 pm EST

    I found

    He had to write : Dim MyCeLL As CellType.ComboBoxCellType = MyFP.Sheets(0).Columns(1).CellType


    instead of : Dim MyCeLL As CellType.ComboBoxCellType = MyFP.Sheets(0).Cells(1, 1).CellType

  • Marked as Answer

    Replied 8 September 2017, 3:14 pm EST

    I found

    He had to write : Dim MyCeLL As CellType.ComboBoxCellType = MyFP.Sheets(0).Columns(1).CellType


    instead of : Dim MyCeLL As CellType.ComboBoxCellType = MyFP.Sheets(0).Cells(1, 1).CellType
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels