Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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





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
=ROUND((ROW()-10)!G$66,L$3) ... what's the error? tripflex Excel Discussion (Misc queries) 3 March 10th 09 02:03 AM
Excel error:ROUND(1000.2555-999,3)=1.255 liaosheng Excel Worksheet Functions 5 September 4th 06 09:15 PM
I am getting a strange round off error in excel derekcowley Excel Worksheet Functions 9 June 19th 06 12:41 PM
Shortcut keys: CNTRL+HOME vs. HOME Paul Ofthewild Excel Discussion (Misc queries) 1 November 24th 05 09:29 PM
Macro Error when moved Xcel Sheets from User's Home Dir to Networ Basheer New Users to Excel 1 April 29th 05 04:45 PM


All times are GMT +1. The time now is 09:13 PM.

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

About Us

"It's about Microsoft Excel"