+ Reply to Thread
Results 1 to 5 of 5

How to set the Message Box decimals to 2 digits in the following code .... ?

  1. #1
    Forum Contributor
    Join Date
    12-11-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    308

    How to set the Message Box decimals to 2 digits in the following code .... ?

    where as the cells in PJ 3-5 are formatted for numbers to be shown in 2 digits but show as many as 12 or more digits in the Message Box !
    The trigger for the file is in changing the number in PS1.

    The problem appears to be apparent when the cell values are referred from another sheet ( although double digits) !

    There appears to be another problem........ When there is data in other sheets with codes , this code starts working on any input .... why ? ... and how can we stop that ?

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by omega0010; 07-13-2015 at 02:28 PM. Reason: Additional info

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: How to set the Message Box decimals to 2 digits in the following code .... ?

    replace the string calculation with this?:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Contributor
    Join Date
    12-11-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    308

    Re: How to set the Message Box decimals to 2 digits in the following code .... ?

    Thanks a ton but I need more help if you can kindly spend some time ......... The following code with lot of data is in Sheet 2 and the Message box runs on just about any in put ...why ?
    Please Login or Register  to view this content.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How to set the Message Box decimals to 2 digits in the following code .... ?

    That code will run whenever the sheet is calculated, it's not triggered by a change in any particular cell/range.
    If posting code please use code tags, see here.

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: How to set the Message Box decimals to 2 digits in the following code .... ?

    Antyhing causing the sheet to calculate will trigger that code... if you want it to behave differently, tell us specifically what you want, and maybe we can help narrow the triggers, although this would not work with the calculate event I believe.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Modifyig code to change decimals to fraction instead of words.
    By zoenightshade in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-11-2015, 05:51 AM
  2. [SOLVED] Excel VB code. Message pops up while code running asking question. Code must not wait.
    By Heinrich Venter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-28-2014, 06:10 AM
  3. [SOLVED] vba code for converting vulgar fractions to decimals
    By wyldjokre69 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-25-2014, 07:08 AM
  4. How do I remove comma and all decimals with vba/macro code
    By KatHat in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2007, 11:30 AM
  5. Replies: 4
    Last Post: 12-20-2005, 07:15 PM
  6. significant digits for decimals
    By Raj in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-03-2005, 09:30 PM
  7. a function on decimals-last two digits
    By Barb Reinhardt in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-06-2005, 06:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1