pls i need to call a private sub from another private sub.i.e calling dgrid_cellclick from del_click with the sender and e parameters

Private Sub Dgrid_Cellclick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles Dgrid.CellClick
        Dim i, j As Integer
        i = e.RowIndex
        j = e.ColumnIndex
        If (Dgrid.Item(0, i).Value) Then
            TextBox2.Text = Dgrid.Item(0, i).Value
        End If
    End Sub

 Private Sub del_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles del.Click
       
    End Sub
kvprajapati commented: Code tag please. -4

You can't -- the Dgrid_Cellclick has more data in the event args than del_click does. Perhaps if you explained what you were trying to do and what controls you are using we could provide you with another solution. If del is a button, for example, then you could look up the currently selected cell and column index on the grid and then use the same code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.