LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can I evaluate a function parameter(string type) as VBA souce code

Dear all
I want to implementate a feature like this :

User type a formula in a cells : =MyFun(a, b, c, "Log(a+b/c"))
a, b, c are named cells, which are of double type.

the VBA code :
Function MyFun(a as double, b as double, c as double, S as string) as double

MyFun = Log(a+b/c) ' I want to to get this result, just like evaluate
the string S as VBA source code. It the S is changed by user in the formula
of the cell, the function can return the correct value.
' Tt's complex since equation parsing is
needed to implemente this feature, I just don't know there is a simple method
of not

End Function

Any help or clus is appreciated.
Thanks a lot~~
 
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
Is there a function that will evaluate a text string in a cell? Dave Excel Worksheet Functions 2 October 7th 09 04:25 AM
Function to evaluate function as string Basil Excel Worksheet Functions 3 September 18th 09 10:43 AM
use function to change a string to function's parameter ViestaWu Excel Worksheet Functions 3 November 21st 07 12:42 PM
Evaluate text string as a function benb Excel Discussion (Misc queries) 3 July 19th 06 02:41 PM
VBA Function to evaluate hlookup text string as formula Eric[_22_] Excel Programming 2 August 2nd 04 04:57 PM


All times are GMT +1. The time now is 08:57 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"