You are not declaring a New test object, hence the error.
Dim obj As New test
Or make the function a Shared Function
Public Shared Function addColumns(ByVal dgv As DataGridView)
dgv.Columns.Add("01", 1)
End Function
Then no need to declare any obj object. Use the function directly.
test.addColumns(DataGridView1)