I also found references to a decimal data type but I think the article is for VB6 (instead of VBA) think I have exhausted the available data types in VBA. To this end I have tried writing a function that returns a double but it does not return enough decimal places. I have seen this answer relating to the accuracy of floating points but it is a different question, it explains the reasons for the inaccuracies whereas I am interested in getting a few extra digits. How can I control the precision of the answer with respect to the number of decimal places shown for ?8/7? before I multiply I get 8 (which, by the way, is also incorrect) but my question is: My pocket calculator provides more decimal places, so it's better than VBA? Right? -) In VBA, in the immediate window, if I type:ฤก.14285714285714 which if I then multiply by 7 gives me a number that is slightly LESS than 8, i.e. It seems improbable that this is not a duplicate of a question that already has an answer but I can't find that question or answer so here I go.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |