Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2007

Tip: Looking for answers? Try searching our database.

setNumberFormat in custom excel function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
puni - 10 Dec 2007 20:47 GMT
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,xFormatNumber)
inside the custom function.
The same call work's fine in all other places except custom excel
functions.

Is there any workaround for this.
Jim Thomlinson - 10 Dec 2007 21:21 GMT
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.
Signature

HTH...

Jim Thomlinson

> 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
[quoted text clipped - 5 lines]
>
> Is there any workaround for this.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.