I have a vba function "Get_Columns_and_Rows" to which I would like to
pass an Excel object defined as

strExcelDoc = "C:\Documents and Settings\wharmon\Desktop\Rapid ILL
for Will\B200507.xls"
Set ExcelDoc = ExcelApp.Workbooks.Open(strExcelDoc)


My function:

Function Get_Columns_and_Rows(ByRef intRow As Integer, ByRef intCol
As Integer, ExcelDoc) As Integer
On Error GoTo Err_Get_Columns_and_Rows

....

Exit_Get_Columns_and_Rows:
Exit Function

Err_Get_Columns_and_Rows:
MsgBox Err.Description & "/" & Err.Number
Resume Exit_Get_Columns_and_Rows

So, anyone know how to reference the Excel object as a function 
parameter?





------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to