Thread
:
Import a CodeModule then call its method in Workbook_Open()
View Single Post
#
5
Posted to microsoft.public.excel.programming
Dave Peterson
external usenet poster
Posts: 35,218
Import a CodeModule then call its method in Workbook_Open()
Just curious...
Why not just keep that code in another workbook (maybe an addin) and run the
code directly from there?
wrote:
I have a Module called "CodeFile.bas" which i Share amongst several
workbooks - It has a method called KickStart()
I want to do something like the following:
Private Sub Workbook_Open()
Me.VBProject.VBComponents.import "c:\CodeFile.bas"
Call KickStart()
End Sub
i.e. Import the code file and then subsequently call one of its
methods.
Any ideas how I could achieve this effect.
Dickster
--
Dave Peterson
Reply With Quote
Dave Peterson
View Public Profile
Find all posts by Dave Peterson