When I reference a DataGrid in a module, I use a sub or function with a parameter that is a DataGrid. For example:
Public Sub SetUpAuthDataGridStyle(ByRef dg As DataGrid)
End Sub
Note the parameter: ByRef dg As DataGrid
This provides a reference to the desired DataGrid through 'dg'.
If you don't want to - or can't - pass the DataGrid to a procedure, you will need a reference to the form on which it lies. In the module, you would ned something like this:
Public DataGridForm as Form1
Then when you need to reference the grid in the module, you would need to set the DataGridForm variable to the calling form (Form1):
Module1.DataGridForm = Me
You then should be able to reference the grid like this:
DataGridForm.dgTools
Let meknow if this helps, or if you need any clarification, etc.
I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
Arrrr, mateys! Ye needs ta be preparin' yerselves fer
Talk Like a Pirate Day! Ye has a choice: talk like a pira