Macros is several worksheets

  • Thread starter Thread starter Lisa
  • Start date Start date
L

Lisa

Hi all -

When I copy a worksheet, I need to be able to use the same macros for the
new sheet. The problem I am having is that when I go to the newly copied
sheet, and run the macro, it goes back to the previous sheet. Is there a way
to have the macro reference the new sheet?
 
Is this worksheet one that other people use and need to use the macros as well?

If not, then I would suggest saving the macros on your personal macro file,
which means they would be accessable only on that computer.
 
I'd create a single addin that did the work. Then I'd either place that addin
in a common location (on a network drive that everyone can read) and let the
users install the addin.

If that's not possible (remote users--or users who are not always connected to
the network), then I'd distribute an addin with the instructions that it has to
be saved in the same folder on everyone's pc.

C:\WorkAddins\LisasUtils.xla

By using the same location, it'll make life much easier if workbooks are shared
between co-workers.

But by creating an addin, I'd have to give the users a way to execute those
macros.

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
or
http://spreadsheetpage.com/index.php/tip/creating_custom_menus

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

And if you use xl2007:

If you want to learn about modifying the ribbon, you can start at Ron de Bruin's
site:
http://www.rondebruin.nl/ribbon.htm
http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an
addin)
or
http://www.rondebruin.nl/2007addin.htm

In xl2007, those toolbars and menu modifications will show up under the addins.
 

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