Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Spreadsheet does not recognize my VBA function
I have written a simple function (just for test) (opening VBA with alt-F11):
Public Function XX() XX = 7.45 End Function but when I use it in a cell - it just shows #NAME? How do I make the function known to my sheet? What could be wrong? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Spreadsheet does not recognize my VBA function
Your UDF works. May not be in a standard module:
User Defined Functions (UDFs) are very easy to install and use: 1. ALT-F11 brings up the VBE window 2. ALT-I ALT-M opens a fresh module 3. paste the stuff in and close the VBE window If you save the workbook, the UDF will be saved with it. To remove the UDF: 1. bring up the VBE window as above 2. clear the code out 3. close the VBE window To use the UDF from Excel: =XX() To learn more about macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm or http://www.cpearson.com/excel/Writin...ionsInVBA.aspx for specifics on UDFs -- Gary''s Student - gsnu200756 "RSunday" wrote: I have written a simple function (just for test) (opening VBA with alt-F11): Public Function XX() XX = 7.45 End Function but when I use it in a cell - it just shows #NAME? How do I make the function known to my sheet? What could be wrong? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printer does not recognize the end of an Excel spreadsheet | Excel Discussion (Misc queries) | |||
Can a spreadsheet recognize the current directory it is in? | Excel Discussion (Misc queries) | |||
Function to recognize 1st of month? | Excel Worksheet Functions | |||
IF Function doesn't recognize TRUE | Excel Worksheet Functions | |||
Trimming Spreadsheet. How to get excel to recognize only used spa | Excel Discussion (Misc queries) |