How to call a procedure in another workbook from Workbook_Open 
Author Message
 How to call a procedure in another workbook from Workbook_Open

Hi All,

I have a VBA macro that I execute from a DOS batch file via the Windows
scheduler. As soon as EXCEL opens it runs the Windows_Open sub in the
specified workbook and from there I call other macros stored in various
modules in the same workbbook. But what if I want to call some macros from
modules that are in another workbook. I cannot use 'call' anymore or 'run'.
How is it done?

Thanks with anticipation.

Milos.



Fri, 18 Feb 2005 10:17:13 GMT  
 How to call a procedure in another workbook from Workbook_Open
Hi

you can set a Reference to the "another workbook".
In the Visual Basic choose Tools->References and then
Browse for the "another workbook".

HTH
J.

Quote:
>-----Original Message-----
>Hi All,

>I have a VBA macro that I execute from a DOS batch file
via the Windows
>scheduler. As soon as EXCEL opens it runs the

Windows_Open sub in the
Quote:
>specified workbook and from there I call other macros
stored in various
>modules in the same workbbook. But what if I want to call
some macros from
>modules that are in another workbook. I cannot use 'call'
anymore or 'run'.
>How is it done?

>Thanks with anticipation.

>Milos.

>.



Sat, 19 Feb 2005 18:25:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Excell workbook procedure call from browser/server script?

2. How to add a workbook_open procedure from vb script (cscript)

3. referencing a local variable in the calling procedure from a nested procedure

4. Excel HRESULT: 0x800A03EC when using Workbooks.open or Workbooks._opentext in C#

5. Excel 97/2000: making custom functions (in a hidden workbook) available to all open workbooks

6. VBA: Excel workbook to workbook transfer

7. combine multiple excel workbooks into one workbook

8. Checking what calls a workbook

9. Help:Is there a way for a CALL stmt to call any procedure

10. VBA Code Private Workbook_Open()

11. object created in workbook_open event handler disappears on exit from the event handler

12. Workbook_Open() instead of MACRO AUTO_OPEN() in VBExcel

 

 
Powered by phpBB® Forum Software