User Defined Function: Format Output

  • Thread starter Thread starter Kenny
  • Start date Start date
K

Kenny

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.
 
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)
 
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
 
So how is cell formatting applied when using the excel
finance function PMT()?
 
PMT() is not a VBA function. Not everything that Excel can do is
exposed for developer use.

Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top