Change function to macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a simple function which compares a datafield on 2 separate worksheets
in same book. How do I take the code for the funct. and convert it to a macro
so I can call it as needed for all of my work?

thx
 
You don't convert it to a macro. The best way I know to be able to access
your function regardless of what workbook you are using is to create an
add-in and then attach the add-in to Excel. One way to do this is:

Open a blank workbook
Add your function code to a module in this workbook.
Save the workbook as an addin: Select "Save as" with a meaningful file name
and then select "Microsoft Excel Add-n(*.xla) from the Save as Type drop down
box.

Then Select Tools, Add-Ins and browse to the file you just created.

Now you can use the function by typing it in a cell or by selecting in under
User Defined Functions in the Function Wizard.
 
Why can't you call a function for all of your work?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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