Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 09-12-2022, 05:34 PM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Help Please, MsgBox with Calculate Windows 10 Help Please, MsgBox with Calculate Office 2019
Competent Performer
Help Please, MsgBox with Calculate
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default oh Wow, that is awesome

Quote:
Originally Posted by Guessed View Post
3E+07 means 3 followed by 7 zeros and is spoken as "three times ten to the power of seven".

If your totals are always whole numbers you can specify the formatting of the answer like this
Code:
MsgBox Format(Selection.Calculate,"#,##0")
or show two decimal places like this
Code:
MsgBox Format(Selection.Calculate,"#,##0.00")
Hint: You can experiment with number formatting in Excel to work out number formatting strings to use in this VBA.
Makes sense, you are right.
Thank you for guiding me. This will help me alot.

But how come the status bar, knows which format to use, it's actually automatic. Why we need to format the numbers in a MsgBox???

Just curiuos, if you know the answer. I was often told that Word is dum, not smart. I find it's actually pretty smart to know which format to use.

Thanks again,
Reply With Quote
 

Tags
helpme; calculate



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any way to get MsgBox columns to line up? Jennifer Murphy Word VBA 3 03-01-2020 12:13 AM
Help Please, MsgBox with Calculate Word VBA - Ignore MsgBox crazzyapple Word VBA 2 11-08-2018 12:06 AM
Help Please, MsgBox with Calculate Problem with Msgbox in VBA Puzzled Programmer Excel Programming 6 09-06-2018 04:34 PM
msgbox when deleting cells Mikedk64 Excel Programming 11 07-13-2017 07:14 AM
Help Please, MsgBox with Calculate Make MsgBox appear... Jamtart PowerPoint 3 09-01-2012 08:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:23 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft