Actually the VBScript for ASP is very similar to straight VB. It won't do some of the formatting, though. You can probably convert the answer to a string and manipulate it to two decimal points that way. That sounds kinda "klunky", though. If any one else knows a better way to format numbers with ASP/VBScript please respond.

I don't know what you are doing in the IRR function so I just played around with the numbers you provided a little. The MsgBox and Alert functions are similar so i included both here, too.

<HEAD>

</HEAD>

<HTML>

<BODY>

<script language="VBScript">

Dim Guess

Dim RetRate

Dim Values(4)

Dim Fmt

Dim MsgStr

Guess = 0.1 ' Guess starts at 10 percent.

Fmt = "#0.00" ' Define percentage format.

Values(0) = -2465399 ' Business start-up costs.

' Positive cash flows reflecting income for four successive years.

Values(1) = 1725956

Values(2) = 1686970

Values(3) = 1599299

RetRate = IRR(Values, Guess) * 100 ' Calculate internal rate.

MsgBox ("The internal rate of return for these four cash flows is " & RetRate & " percent.")

Alert ("The internal rate of return for these four cash flows is " & RetRate & " percent.")

function IRR(Values, Guess)

'Do what you really want here........

IRR = Values(0)/(Values(1) + Values(2) + Values(3))

end function

</script>

</BODY>

</HTML>

I don't know what you are doing in the IRR function so I just played around with the numbers you provided a little. The MsgBox and Alert functions are similar so i included both here, too.

<HEAD>

</HEAD>

<HTML>

<BODY>

<script language="VBScript">

Dim Guess

Dim RetRate

Dim Values(4)

Dim Fmt

Dim MsgStr

Guess = 0.1 ' Guess starts at 10 percent.

Fmt = "#0.00" ' Define percentage format.

Values(0) = -2465399 ' Business start-up costs.

' Positive cash flows reflecting income for four successive years.

Values(1) = 1725956

Values(2) = 1686970

Values(3) = 1599299

RetRate = IRR(Values, Guess) * 100 ' Calculate internal rate.

MsgBox ("The internal rate of return for these four cash flows is " & RetRate & " percent.")

Alert ("The internal rate of return for these four cash flows is " & RetRate & " percent.")

function IRR(Values, Guess)

'Do what you really want here........

IRR = Values(0)/(Values(1) + Values(2) + Values(3))

end function

</script>

</BODY>

</HTML>