Hi Andy,
to make your macro independent from the sheet you want to process,
save your functions or procedures as an Excel Add In.
To do that, copy recorded macros to a module of an empty Workbook and
set the IsAddIn property of the Workbook to TRUE. Then save the
workbook as ExcelAddIn ( extension *.xla ).
>From VEE load the AddIn at runtime and execute your VBA code. You can
pass any parameter even VEE created objects ( i.e. sheet1 as Worksheet
)
examples:
------- VEE code ----------------
xl.Workbooks.Open(root + "\XLA_AddIn\clc.xla");
xl.run("clc.xla!format_clctest",size);
-------- VBA ----------------
Sub format_clctest(size As Double)
or
------- VEE code ----------------
xl.run("battfunc.xla!format_chart",chart_sheet, data_sheet,size);
-------- VBA ----------------
Sub format_chart(chart_sheet As chart, data_sheet As Worksheet, size As Integer)
Hope it helps
Feel free to ask more
Best regards
Christian
From: "Lynch, Andrew" <lyncha@tycoelectronics.com>
To: "'vrf@lvld.agilent.com'" <vrf@lvld.agilent.com>
Subject: vrf Calling Macro
Date sent: Mon, 29 Jul 2002 17:51:50 +0200
> Hi,
> Any advice on calling executing a excel macro form VEE using activeX
> commands?
> Cheers,
> Andy.
> ---------------------------------------------------------------------
> This is the "vrf" maillist, managed by Majordomo. To send messages to
> this maillist, just email to "vrf@lvld.agilent.com". Subscriptions and
> unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
> If you need details, just send a message containing the text "help"
> to "vrf-request@lvld.agilent.com".
> ---------------------------------------------------------------------
>
>
BIOTRONIK GmbH & Co.
EWE 51/CW
D 12359 Berlin - Neuklln
Tel.: +49 30 689 05 - 301
--------------------------------------
christian.wienhold@biotronik.de
--------------------------------------
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo. To send messages to
this maillist, just email to "vrf@lvld.agilent.com". Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------
to make your macro independent from the sheet you want to process,
save your functions or procedures as an Excel Add In.
To do that, copy recorded macros to a module of an empty Workbook and
set the IsAddIn property of the Workbook to TRUE. Then save the
workbook as ExcelAddIn ( extension *.xla ).
>From VEE load the AddIn at runtime and execute your VBA code. You can
pass any parameter even VEE created objects ( i.e. sheet1 as Worksheet
)
examples:
------- VEE code ----------------
xl.Workbooks.Open(root + "\XLA_AddIn\clc.xla");
xl.run("clc.xla!format_clctest",size);
-------- VBA ----------------
Sub format_clctest(size As Double)
or
------- VEE code ----------------
xl.run("battfunc.xla!format_chart",chart_sheet, data_sheet,size);
-------- VBA ----------------
Sub format_chart(chart_sheet As chart, data_sheet As Worksheet, size As Integer)
Hope it helps
Feel free to ask more
Best regards
Christian
From: "Lynch, Andrew" <lyncha@tycoelectronics.com>
To: "'vrf@lvld.agilent.com'" <vrf@lvld.agilent.com>
Subject: vrf Calling Macro
Date sent: Mon, 29 Jul 2002 17:51:50 +0200
> Hi,
> Any advice on calling executing a excel macro form VEE using activeX
> commands?
> Cheers,
> Andy.
> ---------------------------------------------------------------------
> This is the "vrf" maillist, managed by Majordomo. To send messages to
> this maillist, just email to "vrf@lvld.agilent.com". Subscriptions and
> unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
> If you need details, just send a message containing the text "help"
> to "vrf-request@lvld.agilent.com".
> ---------------------------------------------------------------------
>
>
BIOTRONIK GmbH & Co.
EWE 51/CW
D 12359 Berlin - Neuklln
Tel.: +49 30 689 05 - 301
--------------------------------------
christian.wienhold@biotronik.de
--------------------------------------
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo. To send messages to
this maillist, just email to "vrf@lvld.agilent.com". Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------
Any advice on calling executing a excel macro form VEE using activeX
commands?
Cheers,
Andy.
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo. To send messages to
this maillist, just email to "vrf@lvld.agilent.com". Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------