PC Review


Reply
Thread Tools Rate Thread

Calling procedures of a different project

 
 
=?Utf-8?B?Sm9yZ2UgRGUgbGEgUm9zYQ==?=
Guest
Posts: n/a
 
      22nd Aug 2007
I have different VBA procedures in different workbooks and I need to call a
procedure from one workbook to another. How can I do this? How is the right
syntaxis?

I appreciate any help.
--
Jorge De la Rosa
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      22nd Aug 2007
Application.Run "'another book2.xls'!test_msgbox"

as an example

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Jorge De la Rosa" <(E-Mail Removed)> wrote in
message news:96B1CD2B-0CCC-4DCB-A48E-(E-Mail Removed)...
>I have different VBA procedures in different workbooks and I need to call a
> procedure from one workbook to another. How can I do this? How is the
> right
> syntaxis?
>
> I appreciate any help.
> --
> Jorge De la Rosa



 
Reply With Quote
 
=?Utf-8?B?Sm9yZ2UgRGUgbGEgUm9zYQ==?=
Guest
Posts: n/a
 
      23rd Aug 2007
Thank you for you help!.
It worked well
--
Jorge De la Rosa


"Bob Phillips" wrote:

> Application.Run "'another book2.xls'!test_msgbox"
>
> as an example
>
> --
> ---
> HTH
>
> Bob
>
> (there's no email, no snail mail, but somewhere should be gmail in my addy)
>
>
>
> "Jorge De la Rosa" <(E-Mail Removed)> wrote in
> message news:96B1CD2B-0CCC-4DCB-A48E-(E-Mail Removed)...
> >I have different VBA procedures in different workbooks and I need to call a
> > procedure from one workbook to another. How can I do this? How is the
> > right
> > syntaxis?
> >
> > I appreciate any help.
> > --
> > Jorge De la Rosa

>
>
>

 
Reply With Quote
 
Chip Pearson
Guest
Posts: n/a
 
      23rd Aug 2007
Another method is to set a reference from the workbook that needs to call
the function to the workbook that contains the function. In the VBA editor,
open the workbook that contains the functions. Go to the Tools menu and
choose "VBA Project Properties". In that dialog, change the name from
"VBAProject"
to something meaningful, like "MyFunctions". Save that workbook. Then open
the workbook that is going call upon the functions, go to the Tools menu,
choose References, and select "MyFunctions" in the list.

Once you have that reference in place, you can call functions in the
"MyFunctions" project as if they were native VBA functions, without any
qualifiers.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"Jorge De la Rosa" <(E-Mail Removed)> wrote in
message news:96B1CD2B-0CCC-4DCB-A48E-(E-Mail Removed)...
>I have different VBA procedures in different workbooks and I need to call a
> procedure from one workbook to another. How can I do this? How is the
> right
> syntaxis?
>
> I appreciate any help.
> --
> Jorge De la Rosa


 
Reply With Quote
 
=?Utf-8?B?Sm9yZ2UgRGUgbGEgUm9zYQ==?=
Guest
Posts: n/a
 
      23rd Aug 2007
Thanks for your help. I already try this way and work fine.
--
Jorge De la Rosa


"Chip Pearson" wrote:

> Another method is to set a reference from the workbook that needs to call
> the function to the workbook that contains the function. In the VBA editor,
> open the workbook that contains the functions. Go to the Tools menu and
> choose "VBA Project Properties". In that dialog, change the name from
> "VBAProject"
> to something meaningful, like "MyFunctions". Save that workbook. Then open
> the workbook that is going call upon the functions, go to the Tools menu,
> choose References, and select "MyFunctions" in the list.
>
> Once you have that reference in place, you can call functions in the
> "MyFunctions" project as if they were native VBA functions, without any
> qualifiers.
>
>
> --
> Cordially,
> Chip Pearson
> Microsoft MVP - Excel
> Pearson Software Consulting
> www.cpearson.com
> (email on the web site)
>
> "Jorge De la Rosa" <(E-Mail Removed)> wrote in
> message news:96B1CD2B-0CCC-4DCB-A48E-(E-Mail Removed)...
> >I have different VBA procedures in different workbooks and I need to call a
> > procedure from one workbook to another. How can I do this? How is the
> > right
> > syntaxis?
> >
> > I appreciate any help.
> > --
> > Jorge De la Rosa

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
my VBA procedures stopped calling other procedures in excel 2007. Alan in Toronto Microsoft Excel Programming 2 22nd Jul 2009 07:32 PM
Calling OS Procedures/C++ through c# weird0 Microsoft C# .NET 2 30th Dec 2008 03:59 PM
Calling procedures from within VBA =?Utf-8?B?QWxleA==?= Microsoft Excel Programming 2 11th May 2006 01:47 PM
calling standard module procedures from event procedures =?Utf-8?B?b3NzaWFu?= Microsoft Access VBA Modules 2 9th Feb 2006 01:26 PM
Calling to Procedures RalphInBoise Microsoft Access Getting Started 8 25th Oct 2003 08:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:22 PM.