Basic Macro of a workbook to call macro of another workbook
Posted: Fri Jun 17, 2016 3:38 pm
One Basic macro of the Standard library of an embedded Calc document should call a particular macro of the embedded Standard library of another wokbook.
Both workbooks are open.
e.g.
In the Standard library of a workbook named "WKB 1.ods", inside Module1, a macro called macro1 as
sub macro1
'here should be the call to macro2
end sub
and in "WKB 2.ods", inside Module1, resides a macro called macro2
sub macro2
'doing some stuff relevant to workbook 2
end sub
If the 2 macros belonged to the same workbook then I would had stated the module name e.g. Module1.macro2 (or Module2.macro2 if macro2 is inside a separate module).
I guess the Standard library of both workbooks are loaded so no need to use
BasicLibraries.loadLibrary("something pointing to the Standard of the second workbook")
It has to be then like Standard.Module1.macro2 but referring to the desired Standard.
(By the way, even if macro2 was in the same workbook Standard, Standard.Module1.macro2 doesn't work and I don't know why!)
Both workbooks are open.
e.g.
In the Standard library of a workbook named "WKB 1.ods", inside Module1, a macro called macro1 as
sub macro1
'here should be the call to macro2
end sub
and in "WKB 2.ods", inside Module1, resides a macro called macro2
sub macro2
'doing some stuff relevant to workbook 2
end sub
If the 2 macros belonged to the same workbook then I would had stated the module name e.g. Module1.macro2 (or Module2.macro2 if macro2 is inside a separate module).
I guess the Standard library of both workbooks are loaded so no need to use
BasicLibraries.loadLibrary("something pointing to the Standard of the second workbook")
It has to be then like Standard.Module1.macro2 but referring to the desired Standard.
(By the way, even if macro2 was in the same workbook Standard, Standard.Module1.macro2 doesn't work and I don't know why!)