Why does the Format command in Excel VBA perform differently on two different computers?

Mikael Björling 0 Reputation points
2023-04-24T22:02:46.6433333+00:00

I have an Excel VBA code in an older macro that performs differently on two different computers, but I do not why that is. An input string A is "27.67" and the code says B=Format(A). In one computer the result is a number B that can be used in calculations with the value as given by the string. On the second computer, the numeric value becomes "2767" so the decimal point is not correctly treated. Can anyone explain what I must do to make the code work on both computers?

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,694 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,720 questions
0 comments No comments
{count} votes