Excel custom function

Douglas

New Member
Joined
Feb 18, 2002
Messages
19
I've created a custom function in VBA and made it available for use on my PC by saving it as an add in. Unfortunately, when I e-mail a report which uses the function, the recipient gets error messages where-ever the formula appears.

Other than sending valued versions of the report can anyone suggest how to overcome this easily.

Thanks
Douglas
This message was edited by Douglas on 2002-02-20 03:04
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
If the custom function resides in an add-in on your machine then the function will return a #NAME? error on any machine which doesn't also have the add-in available. I can think of 3 options:-

1. As you suggest, use values.
2. Place the UDF code in the workbook you're sending, rather than in the add-in.
3. Send the add-in to the recipient and ask them to install it on their machine. Your functions will then work as normal.

HTH,
D
 
Upvote 0
Thanks for your reply.

I've been thinking that it'd be useful to have a button on my toolbar which would insert a module on the activework and add the bit of code I need.

I've tried recording something as a start but whenever I leave Excel to VVA the macro doesn't record ....

Can you suggest

Cheers
 
Upvote 0
Again, there are various ways you could do this:-

You could write the code 'on-the-fly' i.e. have a macro which writes another macro in the activeworkbook. This can be complicated and involves gaining an understanding of the VBA Extensibility objects.

An easy way would be to export your module to somewhere on your hard drive (just right click the module and choose Export File).

Then in your add-in use this code to add the module to the current workbook:-

Sub AddModule()
ActiveWorkbook.VBProject.VBComponents.Import "C:tempbasyourmodule.bas"
End Sub

HTH,
D
 
Upvote 0
Thank you - this works a treat.
I exported it to a shared drive so the rest of the team can use it!!
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,008
Members
448,935
Latest member
ijat

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top