Newbie question: Importing modules (.bas) at startup?

J

Joe Murphy

I have a .bas file that I use to bold duplicate occurrences in a column.
Works great, but everytime I open a new spreadsheet I have to go to Tools >
Macros > VB Editor and then File > Import File and go find the .bas file.

Is there a way for this .bas file to be loaded into Excel at startup?

Thanks,
JM
 
D

dmang

If this is for personal use, you can add the .bas file to your persona
macro storage, and put a commandbutton on the excel menu. Just clic
the button to run the macro whenever you like
 
J

Joe Murphy

I created a command button and pointed it to the .bas file, but when I
reopened a spreadsheet I wanted to apply the macro to and pressed the new
command button, I got:

"The macro 'Book1!BoldDuplicate' could not be found"

So how do I add it to the application itself (or is that even possible?)?
 
D

Dave Peterson

import your .bas file into a new workbook.

Save that workbook in your XLStart folder and it'll load each time excel starts.

(Lots of people name workbooks that hold their favorite macros personal.xls.)

Then use tools|macros|macro...
select your macro and Run.
When you need to run it.
 

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

Top