Pass values from one form to another

0

Dear

I have two forms A and B.

A = Has the listview and displays information from the base

B = You need to receive form A information and display. (Information that is not displayed in form A)

I need to make this happen through the listview_DblClick () event

    
asked by anonymous 01.11.2017 / 17:01

2 answers

0

Dear

Get it done this way:

In form B I will use the following code

formA.ListView1.SelectedItem.SubItems(x)
    
01.11.2017 / 19:57
0

I was not able to access my other account;

@Marco

I'm just trying to figure out how I'll do it;

I am trying to store the value of the column I need in variables (there are many);

    For i = 2 To LinhaFinal
    Set Item = ListView1.ListItems.Add(Text:=Plan3.Cells(i, 1))
    Item.SubItems(1) = Plan3.Cells(i, 2)
    Item.SubItems(2) = Plan3.Cells(i, 3)
    Item.SubItems(3) = Plan3.Cells(i, 4)
    Item.SubItems(4) = Plan3.Cells(i, 5)
    Item.SubItems(5) = Plan3.Cells(i, 6)
    Item.SubItems(6) = Plan3.Cells(i, 7)
    Item.SubItems(7) = Plan3.Cells(i, 8)
    Item.SubItems(8) = Plan3.Cells(i, 69)
    Item.SubItems(9) = Plan3.Cells(i, 70)
    Item.SubItems(10) = Plan3.Cells(i, 71)
    Item.SubItems(11) = Plan3.Cells(i, 72)
    teste = Plan3.Cells(i, 67)

Next

I want to pass this "test" variable to the other form, because there I have to display in an optionButton (same amount of variables).

    
01.11.2017 / 18:06