Article View: comp.databases.ms-access
Article #401Re: How to pass parameters to procedures from Access to Excel
From: Dev Ashish
Date: Mon, 18 May 1998 00:00
Date: Mon, 18 May 1998 00:00
45 lines
2160 bytes
2160 bytes
You can use the Run method to run a proc in Excel. This also allows you to
pass arguments that the Excel code expects. For example, something like
With objXL.Application
.Visible = True
'Open the Workbook
.Workbooks.Open "D:\CARM\SYS\CARMaV5\CARMaV5a.XLS"
'Include CARMA in menu, run AutoOpen
.ActiveWorkbook.RunAutoMacros xlAutoOpen
x = .Run("AccountsViewEngine", 0)
End With
Set objXL = Nothing
Note that the syntax I've used is
Run(Macro, Arg1, Arg2, ...)
as the function AccountsViewEngine is expecting a Boolean argument
which the zero satisfies.
HTH
--
Dev Ashish (Just my $.001)
---------------
The Access Web ( http://home.att.net/~dashish )
---------------
Desmond Leung wrote in message <6joa55$9ej$1@dover.cityu.edu.hk>...
:Hi all,
:
:I want to write some OLE automation procedure from Access95 to Excel95.
:Does anyone know how to pass any parameters from procedure in Access95
:to procedures written in Excel95.
:
:I do not want to write those parameters on the worksheet and then read it
:from procedure
:in Excel 95!
:
:Many Thanks,
:
:Desmond Leung
:
:
:
Technical Details
Message-ID:
<6jokcg$mgc@bgtnsc03.worldnet.att.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6joa55$9ej$1@dover.cityu.edu.hk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 101bdd,9ee6467ae382e0e1 X-Google-Attributes: gid101bdd,public X-Google-Thread: 111a5a,9ee6467ae382e0e1 X-Google-Attributes: gid111a5a,public X-Google-Thread: 10cc0d,9ee6467ae382e0e1 X-Google-Attributes: gid10cc0d,public X-Google-Thread: ff0ac,9ee6467ae382e0e1 X-Google-Attributes: gidff0ac,public X-Google-Thread: 102b1d,9ee6467ae382e0e1 X-Google-Attributes: gid102b1d,public From: "Dev Ashish" <dash10@hotmail.com> Subject: Re: How to pass parameters to procedures from Access to Excel Date: 1998/05/18 Message-ID: <6jokcg$mgc@bgtnsc03.worldnet.att.net> X-Deja-AN: 354205892 References: <6joa55$9ej$1@dover.cityu.edu.hk> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: AT&T WorldNet Services Newsgroups: comp.databases.ms-access,de.comp.datenbanken.ms-access,es.comp.bd.ms-access,microsoft.public.access.forms,microsoft.public.access.odbcclientserver