Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create "Name" in UDF
Hi,
I want to create a UDF, and then in my VBA I create a "Name" for the calling cell, is it possible? E.g. =GetTotal ( my UDF will return a VALUE, as well as name "that" cell as "SomeText") Thanks, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create "Name" in UDF
Hi Peter,
A UDF returns a value to the calling cell; it cannot alter its environment. If you want to name a cell, you will need to use an appropriate sub. --- Regards, Norman "Peter" wrote in message ... Hi, I want to create a UDF, and then in my VBA I create a "Name" for the calling cell, is it possible? E.g. =GetTotal ( my UDF will return a VALUE, as well as name "that" cell as "SomeText") Thanks, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create "Name" in UDF
Hi,
I can't see how you can do it directly in the function, as you can't pass the cell as a parameter (you get a circular reference). However you could trap the 'Worksheet_Change' event on a worksheet & set names up depending on if the Target returned contained you type of formula .... not what you want but it may be a work-around. Regards, Chris. -- Chris Marlow MCSD.NET, Microsoft Office XP Master "Peter" wrote: Hi, I want to create a UDF, and then in my VBA I create a "Name" for the calling cell, is it possible? E.g. =GetTotal ( my UDF will return a VALUE, as well as name "that" cell as "SomeText") Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create Pivot Table Data with Column "Sum" rather than "count" defa | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
How to create a scatter chart with 2 "X" values with common "Y"s | Charts and Charting in Excel | |||
cannot use "Create List" and "Share Workbook" same time | Excel Discussion (Misc queries) | |||
create links to check boxes marked "good" fair"and "bad" | Excel Worksheet Functions |