Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / PowerPoint / July 2007



Tip: Looking for answers? Try searching our database.

VBA and Round

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
onetwoonetwoandthrough@gmail.com - 11 Jul 2007 22:00 GMT
I just discovered the Round function is missing in the Mac version of
VBA. Is there an easy workaround, or do I have to write my own?

On an urelated note, what happened to the Microsoft interface to this
newsgroup? I looked for it, and the Mactopia site from Microsoft sent
me to Google groups. I normally access this group through nntp, but I
am away from my regular computer now.

--David
Jim Gordon MVP - 12 Jul 2007 04:56 GMT
Hi David,

I know ROUND as an Excel worksheet function in VBA. Are you expecting it to
be part of PowerPoint?

You can use the ROUND function from PowerPoint if Excel is installed.

I always use NNTP so I don't pay much attention to other ways of getting to
the newsgroups.

-Jim

Quoting from "onetwoonetwoandthrough@gmail.com"
<onetwoonetwoandthrough@gmail.com>, in article
1184187635.880255.204720@22g2000hsm.googlegroups.com, on [DATE:

> I just discovered the Round function is missing in the Mac version of
> VBA. Is there an easy workaround, or do I have to write my own?
[quoted text clipped - 5 lines]
>
> --David

Signature

Jim Gordon
Mac MVP

MVPs are not Microsoft Employees
MVP info http://mvp.support.microsoft.com/

Steve Rindsberg - 12 Jul 2007 06:00 GMT
> I just discovered the Round function is missing in the Mac version of
> VBA. Is there an easy workaround, or do I have to write my own?

Well isn't THAT weird.

Something like this do ya?

Function Round(dblNumber as Double) as Integer
 If dblNumber - Cint(dblNumber) > .5 Then
    Round = Cint(dblNumber) + 1
 Else
    Round = Cint(dblNumber)
 End If
End Function


> On an urelated note, what happened to the Microsoft interface to this
> newsgroup? I looked for it, and the Mactopia site from Microsoft sent
> me to Google groups. I normally access this group through nntp, but I
> am away from my regular computer now.

Good starting point:

http://www.microsoft.com/mac/community/community.aspx?pid=newsgroups

Or visit the FAQ:

The PowerPoint Newsgroup
http://www.pptfaq.com/FAQ00275.htm

================================================
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
David M. Marcovitz - 12 Jul 2007 16:30 GMT
Thanks Steve and Jim. I did something like what you suggested for Round.
I have a feeling that it has to do with different versions of VBA (5 vs.
6?) running on Mac PowerPoint and Windows PowerPoint.

As far as the link you suggest to the newsgroups, that link points to the
Google interface.

--David (back on NNTP)

Signature

David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

> In article <1184187635.880255.204720@22g2000hsm.googlegroups.com>,
> wrote:
[quoted text clipped - 33 lines]
> PPTools:  www.pptools.com
> ================================================
Steve Rindsberg - 13 Jul 2007 14:44 GMT
> Thanks Steve and Jim. I did something like what you suggested for Round.
> I have a feeling that it has to do with different versions of VBA (5 vs.
[quoted text clipped - 4 lines]
>
> --David (back on NNTP)

Feels so nice when you stop hitting yourself over the head, doesn't it?

BTW, Chirag has kindly pointed out the folly of my ways.
The function I posted will work for positive numbers, within limits, for the
wrong reason.

This (courtesy of Chirag) does the deed:

Function Round(ByVal D As Double) As Long
    Round = Fix(D + Sgn(D) * 0.5)
End Function

================================================
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
David M. Marcovitz - 13 Jul 2007 15:33 GMT
>> Thanks Steve and Jim. I did something like what you suggested for
>> Round. I have a feeling that it has to do with different versions of
[quoted text clipped - 23 lines]
> PPTools:  www.pptools.com
> ================================================

Thanks for everyone's help. I have passed this function along to my
student who was surprised that the great project that his group completed
didn't work on his Mac because of the missing Round function.

Signature

David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.