Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm an old-time programmer, but new to VBA in Excel 2007. I've written a
UDF, but so far, I haven't figured out how to test it in the Immediate window (or the worksheet, for that matter). It compiles without error, but how do I store it to make it accessible to the associated worksheet? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just put it in a standard code module.
-- __________________________________ HTH Bob "cec34" wrote in message ... I'm an old-time programmer, but new to VBA in Excel 2007. I've written a UDF, but so far, I haven't figured out how to test it in the Immediate window (or the worksheet, for that matter). It compiles without error, but how do I store it to make it accessible to the associated worksheet? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don't store it in a Worksheet Module, but in a General Module. So, from the
VBA menu: InsertModule and paste the code there. Now you can call it from a worksheet as if it were a built-in Excel function. If you need to acces it from other workbooks or even distribute it: read this: http://www.jkp-ads.com/Articles/DistributeMacro00.asp It says it is about macros, but most of it is true for functions as well -- Kind regards, Niek Otten Microsoft MVP - Excel "cec34" wrote in message ... I'm an old-time programmer, but new to VBA in Excel 2007. I've written a UDF, but so far, I haven't figured out how to test it in the Immediate window (or the worksheet, for that matter). It compiles without error, but how do I store it to make it accessible to the associated worksheet? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put it in a standard module.
From the VBA window: Insert Module then paste the stuff in. Consider making the UDF Public. -- Gary''s Student - gsnu200860 "cec34" wrote: I'm an old-time programmer, but new to VBA in Excel 2007. I've written a UDF, but so far, I haven't figured out how to test it in the Immediate window (or the worksheet, for that matter). It compiles without error, but how do I store it to make it accessible to the associated worksheet? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
http://www.anthony-vba.kefra.com/vba/vbabasic1.htm
http://articles.techrepublic.com.com...1-5300300.html HTH, Ryan-- -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "Gary''s Student" wrote: Put it in a standard module. From the VBA window: Insert Module then paste the stuff in. Consider making the UDF Public. -- Gary''s Student - gsnu200860 "cec34" wrote: I'm an old-time programmer, but new to VBA in Excel 2007. I've written a UDF, but so far, I haven't figured out how to test it in the Immediate window (or the worksheet, for that matter). It compiles without error, but how do I store it to make it accessible to the associated worksheet? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks! That's what I needed.
cec34 "Gary''s Student" wrote: Put it in a standard module. From the VBA window: Insert Module then paste the stuff in. Consider making the UDF Public. -- Gary''s Student - gsnu200860 "cec34" wrote: I'm an old-time programmer, but new to VBA in Excel 2007. I've written a UDF, but so far, I haven't figured out how to test it in the Immediate window (or the worksheet, for that matter). It compiles without error, but how do I store it to make it accessible to the associated worksheet? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Store array ??? | Excel Worksheet Functions | |||
store variables | Excel Programming | |||
How can I store both key and value in VBA? | Excel Programming | |||
store inventory sheet(ex:sports equipment store) | Excel Worksheet Functions | |||
Where to store macros? | Excel Discussion (Misc queries) |