Using macros in an external worksheet

G

Guest

What is the best way to setup Excel if I need to access macros in an external
worksheet and run them in a variety of worksheets? I tried saving them in a
..xls worksheet and then setup Excel to open the worksheet when the app opens,
but the worksheet is always displayed. Should I save the worksheet as a *.xla
and then add it as an add-in?
 
D

dq

You can do this either manually or put it in the Workbook_Open event.
(in the ThisWorkbook codepane)

DQ
 
G

Guest

So how is this different from saving the workbook with the macro as a .xla
file and then using Tools > AddIns to add it to the workbooks in which it
needs to run?
 
G

Guest

Would you please reread my last post. Your most recent response did not
answer the question.
 
D

Dave Peterson

I would save the file as an addin so the workbook will be hidden when it opens.

But then I'd have to give the users (myself???) some way of running those
procedures.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

=======
If you're going to save this addin with others and you have UDF's called from
cells in a worksheet, then I'd save the addin (DCH3Utils.xla) in a common
location -- a shared folder and tell the users to install the addin using the
UNC path name (not a mapped letter).

If that's not possible, then I'd tell the users to save it to the same folder
name:

C:\MyAddins\dch3utils.xla

Then tools|addins|browse and install it from there.
 
G

Guest

Thx - that's what I've been looking for.

Dave Peterson said:
I would save the file as an addin so the workbook will be hidden when it opens.

But then I'd have to give the users (myself???) some way of running those
procedures.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

=======
If you're going to save this addin with others and you have UDF's called from
cells in a worksheet, then I'd save the addin (DCH3Utils.xla) in a common
location -- a shared folder and tell the users to install the addin using the
UNC path name (not a mapped letter).

If that's not possible, then I'd tell the users to save it to the same folder
name:

C:\MyAddins\dch3utils.xla

Then tools|addins|browse and install it from there.
 

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