Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default Change function to macro

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Change function to macro

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.

"Brian" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Change function to macro

Why can't you call a function for all of your work?

--

HTH

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


"Brian" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use Macro To Change Which Macro Assigned To Command Button CVinje Excel Discussion (Misc queries) 0 May 25th 10 09:55 PM
Insert row at change macro - how to change it. cathit Excel Discussion (Misc queries) 1 March 26th 09 07:14 PM
macro that will change the font of a cell if i change a value jk Excel Discussion (Misc queries) 2 July 29th 08 04:39 PM
How do I change macro text with another macro? Eric Excel Discussion (Misc queries) 4 April 27th 05 11:20 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM


All times are GMT +1. The time now is 03:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"