TheSwamp

Code Red => VB(A) => Topic started by: iliekater on December 09, 2006, 12:28:42 PM

Title: Calling a VBA sub from another VBA file
Post by: iliekater on December 09, 2006, 12:28:42 PM
Here's a funny question :
Lets say we have two VBA files . Is it possible from within the first application , to call a sub written in the second file ? That would be very useful to me since I wouldn't need to repeat the same code in every VBA application .
Title: Re: Calling a VBA sub from another VBA file
Post by: Bryco on December 09, 2006, 07:04:28 PM
Try adding a reference to the other vba project, then you can use the subs by prefacing it with the project name
Title: Re: Calling a VBA sub from another VBA file
Post by: iliekater on December 10, 2006, 02:04:10 AM
It was as simple as that ! That's why they called it Basic !