Depends what you want to do with it: If you just want to access the control and get data from it, you just have to declare a DataGridView parameter:
Private Sub WhatEver()
ExportDateToExcel(myDataGridView)
End Sub
Private Sub ExportDataToExcel(dgv As DataGridView)
Dim rows As DataGridViewRowCollection = dgv.Rows
End Sub