First of all, .xlsx files are designed SPECIFICALLY to remove all modules when the file is saved. (Microsoft hoped to use this as a mechanism to reduce the spread of viruses)
Second, when you save the file, close and reopen it, (assuming .xlsm or .xlsb format) is the macro module still there? I created a new file (called it SigFunct.xlsm) I created a module (kept the name Module1) I copied your function into Module1 I entered (5) into Cell A1 I inserted =Sigmoid(A1) into cell B1 I saved the file and exited. When I opened the file, it worked just fine. so.. how is what I did different from what you did? Paul ----------------------------------------- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley ----------------------------------------- ________________________________ From: "gkad...@gkading.com" <gkad...@gkading.com> To: excel-macros@googlegroups.com Sent: Wed, March 27, 2013 11:30:28 AM Subject: $$Excel-Macros$$ Need help using Modules in Excel 2007 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!-- 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. -- 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.