+ Reply to Thread
Results 1 to 5 of 5

Macro rounds amount automatically

  1. #1
    Registered User
    Join Date
    01-08-2010
    Location
    Montréal Québec
    MS-Off Ver
    Excel 2003
    Posts
    9

    Macro rounds amount automatically

    Hi ,

    My problem is that my macro rounds the amount I am adding in a variable automatically. Any idea how to cerrect that?

    Thank you

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Macro rounds amount automatically

    Can you post your code and/or a sample workbook showing the problem.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    01-08-2010
    Location
    Montréal Québec
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Macro rounds amount automatically

    Please Login or Register  to view this content.

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Macro rounds amount automatically

    All your variables are Longs, which are whole numbers. Use Double instead of Long if you need decimal places.
    Remember what the dormouse said
    Feed your head

  5. #5
    Valued Forum Contributor blane245's Avatar
    Join Date
    02-20-2009
    Location
    Melbourne, FL
    MS-Off Ver
    Excel 2010
    Posts
    649

    Re: Macro rounds amount automatically

    I also noticed that in the lines
    Please Login or Register  to view this content.
    the variables TVP_BC, etc. are not defined. Did you mean SommeTVP_BC, ...?
    Bob
    Click my star if my answer helped you. Mark the thread as [SOLVED] if it has been.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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