Thread View: comp.databases.ms-access
2 messages
2 total messages
Started by Desmond Leung
Mon, 18 May 1998 00:00
How to pass parameters to procedures from Access to Excel
Author: Desmond Leung
Date: Mon, 18 May 1998 00:00
Date: Mon, 18 May 1998 00:00
14 lines
1272 bytes
1272 bytes
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
Re: How to pass parameters to procedures from Access to Excel
Author: 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
:
:
:
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads