Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
setNumberFormat in custom excel function
I have a custom C++ excel function. When the function's output is a
number, I want to format it with commas in 1000s and right justify in the cell. I get return code 2 when I try using success = XlfExcel::Instance().Call(xlcFormatNumber,0,1,xFor matNumber) inside the custom function. The same call work's fine in all other places except custom excel functions. Is there any workaround for this. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
setNumberFormat in custom excel function
UDF's return values and that is it. They can not modify formats nor can they
change the values of cells that they are not in... When called from within code they have free reign to do what they want, but not when called as a function from a cell. -- HTH... Jim Thomlinson "puni" wrote: I have a custom C++ excel function. When the function's output is a number, I want to format it with commas in 1000s and right justify in the cell. I get return code 2 when I try using success = XlfExcel::Instance().Call(xlcFormatNumber,0,1,xFor matNumber) inside the custom function. The same call work's fine in all other places except custom excel functions. Is there any workaround for this. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
#VALUE! error with custom excel vba function | Excel Discussion (Misc queries) | |||
recalculation of a custom function in excel | Excel Programming | |||
Excel custom function dialog | Excel Worksheet Functions | |||
Excel VBA -Custom function sumproduct | Excel Programming | |||
Adding a custom function to the default excel function list | Excel Programming |