Just try to replace your function with following.

public Function Sigmoid(t) as double
Sigmoid=1/(1+exp(-t))
End Function

regards
prince

On Thursday, March 28, 2013 4:37:23 AM UTC+5:30, gka...@gkading.com wrote:
>
>
> On Wednesday, March 27, 2013 9:30:05 AM UTC-6, gka...@gkading.com wrote:
>>
>> I've created a simple module in excel 2007:
>> Function Sigmoid(t)
>> Sigmoid=1/(1+exp(-t))
>> End Function
>>  
>> The sigmoid function seems to work in formulas initially, but when file 
>> is saved, closed, then reopened, the formula's don't seem to work -- I get 
>> 'NAME' error in cell with formula indicating unrecognized function.  I've 
>> tried saving file as .xlsx and seperately as .xlsm and get same problem 
>> either way.  There must be problem with the way I am storing the module??
>>  
>> Any help would be appreciated.
>> Thanks!
>>  
>>  
>>
> Thanks Paul for the reply.
> What you have outlined is basically what i have done.  And when I reopen 
> the file after saving in .xlsm format, the module is still there (named 
> module1).
> And initially the file opens with the proper values in all cells.  But as 
> soon as I change a cell value  (any cell), then the cells with the sigmoid 
> function show the 'NAME' error, and I have not been able to clear it even 
> by re-entering the module. 
>  
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to