How can i include a .vbs file in another .vbs file

  • Thread starter Thread starter Store a reference of a excel workbook
  • Start date Start date
S

Store a reference of a excel workbook

I have created a library of common functions and named it "functions.vbs".
Now i wanted to include it in other vbs files so that i can use functions
defined in it. Please tell me the way to do it.
 
Did you mean to post a question about .vbs files in a forum dedicated to excel?
 
Hi Dave,

Actually i have created a lot of common excel functions that can be used
later and stored them in a vbs file (just for modularity). Now i wanted to
know the way to call those excel functions from the other vbs files.
 
I'd just open the text file (VBA code, not VBS code!) and then copy|paste into a
module inside the VBE.

But just as you can export modules as .BAS files (that's the normal suffix), you
can import those .bas (or other text files).

Read Chip Pearson's page:
http://www.cpearson.com/excel/vbe.aspx

If I have common procedures that I want available each time I open excel (not
just a repository for the code), I'd create another workbook (saved as an
Addin???) and have that open with excel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top