RE:Pasar una variable a un formulario
'haz click una fila y luego abre el nuevo form.........
Espero te ayude.........
Structure MydAta
Dim micol0 As String
Dim micol1 As String
End Structure
Public MyArr As MydAta
Dim iRow As Integer
Dim myfrm As New Form2
Private Sub DataGrid1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.Click
iRow = DataGrid1.CurrentRowIndex
PrintCells(DataGrid1, iRow)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
myfrm.Show()
End Sub
Private Sub PrintCells(ByVal myGrid As DataGrid, ByVal fila As Integer)
Dim iCol, cols As Integer
Dim myTable As DataTable
myTable = CType(DataGrid1.DataSource, DataTable)
cols = myTable.Columns.Count - 1
MyArr.micol0 = (myGrid(iRow, 0))
MyArr.micol1 = (myGrid(iRow, 1))
myfrm.TextBox1.Text = MyArr.micol0.ToString 'llena el dato de la columna0 en el textbox1 del formulario nuevo
myfrm.TextBox2.Text = MyArr.micol1.ToString 'llena el dato de la columna1 en el textbox2 del formulario nuevo
End Sub