Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Replacing UDFs with their value

I've developed an Excel Addin with several UDFs. Everything's fine until my
users want to pass their spreadsheets to other people that don't have my
addin installed. They get #Name in the cells that reference my UDFs. How do
my customers replace the references to my UDFs with their results? These UDFs
could be part of another formula.

e.g = MyUDF(10 * Sum(A1:A10) * MyUDF(B2))

The only solution that I can think of at the moment is to a do a global copy
& paste value, but these loses all formulae.

I know that Excel can replace parts of a formula with its value whilst
editing it. Can this be done programmatically?

Thanks

Dave
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Replacing UDFs with their value

Dave,

I had this EXACT same problem with an accounting system add-in. Some
people had the add-in installed on their machine (i.e. - they had
access to the accounting system) and some did not (usually managers who
reviewed the work but did not prepare it and thus had no need for the
accounting system access.)

So, I wrote and add-in called Formula Freeze where the user can
maintain a list of formulas that they could later convert to values
(freeze) with a click of a button before they distributed their
workpapers to others. I don't mind sending it to you, but there are a
number of caveats:

In the current version of Formula Freeze, you can't freeze "nested
formulas". For example:

Formula to Freeze: FOO

This will freeze: =FOO(...stuff....), -FOO(...stuff...),
+FOO(...stuff...)
=FOO(...stuff...) + FOO(...other stuff...)

This won't: =SUM(FOO(...stuff...),FOO(...other stuff...))

I working on adding this functionality as we speak, but this is proving
more challenging than one might expect! If you're interest, I'll send
you the add-in.

Thanks,
Johnny

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Replacing UDFs with their value

Hi Jonny

I'd certainly be interested in taking a look. I'll send you an email, so you
can reply with the code.

Thanks

Dave

"Johnny" wrote:

Dave,

I had this EXACT same problem with an accounting system add-in. Some
people had the add-in installed on their machine (i.e. - they had
access to the accounting system) and some did not (usually managers who
reviewed the work but did not prepare it and thus had no need for the
accounting system access.)

So, I wrote and add-in called Formula Freeze where the user can
maintain a list of formulas that they could later convert to values
(freeze) with a click of a button before they distributed their
workpapers to others. I don't mind sending it to you, but there are a
number of caveats:

In the current version of Formula Freeze, you can't freeze "nested
formulas". For example:

Formula to Freeze: FOO

This will freeze: =FOO(...stuff....), -FOO(...stuff...),
+FOO(...stuff...)
=FOO(...stuff...) + FOO(...other stuff...)

This won't: =SUM(FOO(...stuff...),FOO(...other stuff...))

I working on adding this functionality as we speak, but this is proving
more challenging than one might expect! If you're interest, I'll send
you the add-in.

Thanks,
Johnny


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Replacing UDFs with their value

Hello,
As this seems to be a more general issue, Id like to provoke discussion
about the topic. In my opinion add-in is not always the best solution how to
apply distant UDFs; maybe your case is a piece of evidence. Working with a
pseudo-add-in workbook needs some provisions i.e. links, opening (automatic
in XLStart), and another type of security. You gain instead, for example, a
non hidden bid of included subs, and, regarding your problem, you may
constuct a simpler freezing macro that doesn't need any list of add-in
functions but recognizes the workbook name alone.
Petr
--
Petr Bezucha


Johnny pÃ*Å¡e:

Dave,

I had this EXACT same problem with an accounting system add-in. Some
people had the add-in installed on their machine (i.e. - they had
access to the accounting system) and some did not (usually managers who
reviewed the work but did not prepare it and thus had no need for the
accounting system access.)

So, I wrote and add-in called Formula Freeze where the user can
maintain a list of formulas that they could later convert to values
(freeze) with a click of a button before they distributed their
workpapers to others. I don't mind sending it to you, but there are a
number of caveats:

In the current version of Formula Freeze, you can't freeze "nested
formulas". For example:

Formula to Freeze: FOO

This will freeze: =FOO(...stuff....), -FOO(...stuff...),
+FOO(...stuff...)
=FOO(...stuff...) + FOO(...other stuff...)

This won't: =SUM(FOO(...stuff...),FOO(...other stuff...))

I working on adding this functionality as we speak, but this is proving
more challenging than one might expect! If you're interest, I'll send
you the add-in.

Thanks,
Johnny


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Replacing UDFs with their value

Hi Petr

Thanks for the suggestion, but I don't really want to rework my addin to be
a pseudo addin workbook. It would also screw up my existing users. My addin
only has three UDFs so recognizing the workbook name only wouldn't give me a
huge performance benefit.

I'm working on some VBA code and hopefully the whole process shouldn't be
too difficult. Other suggestions are still welcome, just in case I'm missing
something.

Thanks away

Dave


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
Help and description for UDFs [email protected] Excel Worksheet Functions 0 March 13th 07 05:05 AM
UDFs DoctorG Excel Programming 3 July 5th 05 01:49 PM
VBA, UDFs and VSTO Terence Craig Excel Programming 3 October 25th 04 07:57 AM
'portable' UDFs??? whelanj[_7_] Excel Programming 1 July 9th 04 01:13 PM
Acrobat 6.0 and UDFs Mike Lee[_2_] Excel Programming 0 January 29th 04 04:07 PM


All times are GMT +1. The time now is 09:00 PM.

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

About Us

"It's about Microsoft Excel"