Results 1 to 9 of 9

Calculate using decimals?

Threaded View

  1. #1
    Forum Contributor onmyway's Avatar
    Join Date
    09-03-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2013
    Posts
    386

    Calculate using decimals?

    Hi guys,

    I hope you can help with solving this Format and calculation issue.

    All my fields in my calculation are formatted to make use of the following format: 1,00. I.e, it automatically takes a single decimal, and add the (,) comma ad 2 zeros. One can also capture a number with decimal, like 1,25

    The problem is that my answer/result field .txtStockEOS1 does not calculate the decimals, only the numbers before the (,). Note: This field has not been formatted. I.e., 10 = 5,8 + 3,8 + 2,5, instead of the answer being 12,1

    Here is my code that calculates on Change event:

    Private Sub txtStockSOS1_Change()
       Me.txtStockEOS1 = Val(txtStockSOS1.Value) + Val(txtStockReceive1.Value) - Val(txtStockLost1.Value) - Val(txtStockBroken1.Value) - Val(txtStockWorn1.Value)
    End Sub
    Thank you all!
    Last edited by onmyway; 03-12-2015 at 11:10 AM.
    Sharing knowledge, can be likened to taking another person's hand, and pulling them up to a higher level -- onmyway

    If I was helpful, please remember to click on * Add Reputation below

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How do I calculate without decimals in excel?
    By upstate in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  2. [SOLVED] How do I calculate without decimals in excel?
    By upstate in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  3. How do I calculate without decimals in excel?
    By Duke Carey in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  4. How do I calculate without decimals in excel?
    By upstate in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. How do I calculate without decimals in excel?
    By upstate in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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