Hi, I'm trying to pass an object to a function so that I can use the same function multiple times.

For example, this is what I have now:
VB Code:
  1. 'In Form
  2. Call funMain(grid1)
  3.  
  4. 'In Module
  5. Function funMain(optional obj)
  6.    frmMain.grid1.TextMatrix(5,5) = "Hello World"
  7. End Function

I would like to change the module code to:
VB Code:
  1. frmMain.obj.TextMatrix(5,5) = "Hello World"

and have it update whichever grid is passed to it. Is this possible in VB?

thanks,

Dimava