ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Round error on home comp (https://www.excelbanter.com/excel-programming/271481-re-round-error-home-comp.html)

Dave Peterson[_3_]

Round error on home comp
 
VBA's round was added in xl2k.

You can use application.round in xl97, but be aware that they do slightly
different things:

http://support.microsoft.com/default...;en-us;q225330
OFF2000: New Round Function in Visual Basic for Applications 6.0

Marcus wrote:

Hi all

i took an excel sheet home to have a quick look at from work, however it
breaks on this line on my home comp :

totalpercent(7) = Round((totaldelay(7) / totalday) * 100, 2)

it highlights the word Round and says sub or function not defined,
seeing as i am only running the maco i have not changed anything.

any ideas ?

Thanks!

Oh i use win98 excel 2002 at work, at home where prob is i use win98 excel
97 if that helps.

Cheers!


--

Dave Peterson


Marcus

Round error on home comp
 
Thanks that worked,
just did a replace round for application.round and worked

is there a way i can ask the macro to pick up what version of excel i am
using so i dont have to always do this
eg

if excel2000 then round
if excel97 then application.round

Cheers

"Dave Peterson" wrote in message
...
VBA's round was added in xl2k.

You can use application.round in xl97, but be aware that they do slightly
different things:

http://support.microsoft.com/default...;en-us;q225330
OFF2000: New Round Function in Visual Basic for Applications 6.0

Marcus wrote:

Hi all

i took an excel sheet home to have a quick look at from work, however

it
breaks on this line on my home comp :

totalpercent(7) = Round((totaldelay(7) / totalday) * 100, 2)

it highlights the word Round and says sub or function not defined,
seeing as i am only running the maco i have not changed anything.

any ideas ?

Thanks!

Oh i use win98 excel 2002 at work, at home where prob is i use win98

excel
97 if that helps.

Cheers!


--

Dave Peterson




Tom Ogilvy

Round error on home comp
 
if val(application.Version) = 8 then
' Excel 97
else


End if

Regards,
Tom Ogilvy

Marcus wrote in message
...
Thanks that worked,
just did a replace round for application.round and worked

is there a way i can ask the macro to pick up what version of excel i am
using so i dont have to always do this
eg

if excel2000 then round
if excel97 then application.round

Cheers

"Dave Peterson" wrote in message
...
VBA's round was added in xl2k.

You can use application.round in xl97, but be aware that they do

slightly
different things:

http://support.microsoft.com/default...;en-us;q225330
OFF2000: New Round Function in Visual Basic for Applications 6.0

Marcus wrote:

Hi all

i took an excel sheet home to have a quick look at from work, however

it
breaks on this line on my home comp :

totalpercent(7) = Round((totaldelay(7) / totalday) * 100, 2)

it highlights the word Round and says sub or function not defined,
seeing as i am only running the maco i have not changed anything.

any ideas ?

Thanks!

Oh i use win98 excel 2002 at work, at home where prob is i use win98

excel
97 if that helps.

Cheers!


--

Dave Peterson







All times are GMT +1. The time now is 09:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com