+ Reply to Thread
Results 1 to 2 of 2

VBA Causes Errors when Run in the German Settings

Hybrid View

  1. #1
    Registered User
    Join Date
    09-24-2009
    Location
    Atkinson, NH
    MS-Off Ver
    Excel 2003
    Posts
    23

    VBA Causes Errors when Run in the German Settings

    I have developed a process design application in Excel using User Forms to input data. The data are placed on a sheet of a workbook with the majority of the calculations being done by cell-to-cell calculations so that users can view the formulas if they so desire. This application works well in English. We want to use the same application in our German office where it has not worked well.

    In order to trouble shoot the problems, I can go to the Region and Language setting under Control Panel and set it to German (Germany). This converts the number format to a period for the thousands separator and a comma for the decimal. This seems to create a lot of problems for VBA that I have not been able to sort out.

    To simplify the problem I have written a very simple program. It has one User Form with two text boxes for number input, an Enter command button and a Close command button. Sheet 1 has a command button that opens the User Form. In the User Form, I enter a number in both text boxes and click Enter. VBA code then enters the number from Text Box 1 in Cell A1 and the number from Text Box 2 in Cell A2. Cell A3 has an equation that calculates the sum of A1 and A2. All cells are formatted as General.

    The workbook works as expected in English. When I set my PC to German (Germany) the application works as expected when I enter an integer in the text boxes. However, if I enter a decimal such as, in the German format, 10,5 and 5,5, the numbers entered into the spreadsheet are text (left justified) and the sum is zero. I have to enter 10.5 and 5.5 to get the numbers to enter as actual numbers and give the correct sum.

    Can anyone provide some insight on how to make VBA work with the German settings?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,644

    Re: VBA Causes Errors when Run in the German Settings

    See if this helps:

    http://www.oaltd.co.uk/ExcelProgRef/...rogRefCh22.htm


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. [SOLVED] One of the Settings in Options Trust Center Settings is Grayed out
    By zit1343 in forum Excel General
    Replies: 2
    Last Post: 06-28-2012, 09:18 AM
  2. German Help Files?!
    By Dan Davies in forum Excel General
    Replies: 0
    Last Post: 09-16-2009, 04:35 PM
  3. German Help Files?!
    By Dan Davies in forum Excel General
    Replies: 0
    Last Post: 09-15-2009, 12:13 AM
  4. [SOLVED] German VBA Problem
    By Crumb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2006, 05:55 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