Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default User Defined Function: Format Output

If i am using a user defined function (VBA code)

i.e.

Function TestFunc(Input Variables etc...) As Variant

'Code here

TestFunc = "Result of Code"

End Function

How is cell formatting applied similar to the way the
excel function PMT() changes format to red if output value
is negative.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default User Defined Function: Format Output

That is done in the cell format.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Kenny" wrote in message
...
If i am using a user defined function (VBA code)

i.e.

Function TestFunc(Input Variables etc...) As Variant

'Code here

TestFunc = "Result of Code"

End Function

How is cell formatting applied similar to the way the
excel function PMT() changes format to red if output value
is negative.



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default User Defined Function: Format Output

But how is it done automatically from a user defined excel
function?

-----Original Message-----
That is done in the cell format.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Kenny" wrote in

message
...
If i am using a user defined function (VBA code)

i.e.

Function TestFunc(Input Variables etc...) As Variant

'Code here

TestFunc = "Result of Code"

End Function

How is cell formatting applied similar to the way the
excel function PMT() changes format to red if output

value
is negative.



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default User Defined Function: Format Output

So how is cell formatting applied when using the excel
finance function PMT()?

-----Original Message-----
A VBA function called from a worksheet can only return a

value, it
cannot modify the environment in any way. In particular,

it cannot
change cell formats.

Jerry

wrote:

But how is it done automatically from a user defined

excel
function?


-----Original Message-----
That is done in the cell format.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing

direct)

"Kenny" wrote in

message

.. .

If i am using a user defined function (VBA code)

i.e.

Function TestFunc(Input Variables etc...) As Variant

'Code here

TestFunc = "Result of Code"

End Function

How is cell formatting applied similar to the way the
excel function PMT() changes format to red if output

value

is negative.


.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 837
Default User Defined Function: Format Output

PMT() is not a VBA function. Not everything that Excel can do is
exposed for developer use.

Jerry

Kenny wrote:

So how is cell formatting applied when using the excel
finance function PMT()?


-----Original Message-----
A VBA function called from a worksheet can only return a

value, it

cannot modify the environment in any way. In particular,

it cannot

change cell formats.

Jerry

wrote:


But how is it done automatically from a user defined

excel

function?



-----Original Message-----
That is done in the cell format.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing

direct)

"Kenny" wrote in


message


. ..


If i am using a user defined function (VBA code)

i.e.

Function TestFunc(Input Variables etc...) As Variant

'Code here

TestFunc = "Result of Code"

End Function

How is cell formatting applied similar to the way the
excel function PMT() changes format to red if output


value


is negative.

.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
user defined functions format df_newtovba Excel Discussion (Misc queries) 3 September 22nd 08 05:17 PM
Custom Format for User Defined Function [email protected] Excel Discussion (Misc queries) 5 August 7th 06 11:27 PM
AutoExpanding User Defined Function Output MikeCave Excel Programming 1 March 1st 04 10:29 AM
User-Defined Function pre-empting Built-in Function? How to undo???? MarWun Excel Programming 1 August 6th 03 09:31 PM
User-defined function with a naming format of =ABC.XYZ. Vipul S. Parekh Excel Programming 1 July 31st 03 02:44 AM


All times are GMT +1. The time now is 01:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"