+ Reply to Thread
Results 1 to 13 of 13

comma vs. point

  1. #1
    Forum Contributor
    Join Date
    12-11-2018
    Location
    Zurich
    MS-Off Ver
    2016
    Posts
    130

    comma vs. point

    I used the code below to make a change event. Unfroutunately it writes in the numbers into the excel sheet with a comma instead of a point. This makes it afterwards impossible to use this number for further calculations. I have used the exact same code in the same program earlier on, where it works absolutely fine.. I ve got no idea whats wrong here. I alredad tried the CDbl function, whcih is not working.. Thanks for the help.

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,431

    Re: comma vs. point

    I'm no VBA expert, but T_01 does not appear to contain anything that needs changing. If the Replace statement at the top works, then add another for each variable.

    Here's what this novice would try:
    Please Login or Register  to view this content.
    If it works, then adapt it for the other cases.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    12-11-2018
    Location
    Zurich
    MS-Off Ver
    2016
    Posts
    130

    Re: comma vs. point

    Hello,

    when I change the code to:

    Please Login or Register  to view this content.
    the numbers are written in with the point instead of comma, which is good. However I cannot anymore make my selection via the combobox. Means when I change T_02 from "Wasserstrom" to "Graustrom", then the values are not adapted...

    Best, Matthias

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,431

    Re: comma vs. point

    I think it's time to share the workbook.

  5. #5
    Forum Contributor
    Join Date
    12-11-2018
    Location
    Zurich
    MS-Off Ver
    2016
    Posts
    130

    Re: comma vs. point

    Well, I cant, its too big...

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,431

    Re: comma vs. point

    Yes, you can. We don't need to see your entire project. Copy it and then cut it down to a sample file that displays the issue. That's what a lot of people have to do here.

  7. #7
    Forum Contributor
    Join Date
    12-11-2018
    Location
    Zurich
    MS-Off Ver
    2016
    Posts
    130

    Re: comma vs. point

    here is the simplified book. So far I havent been able to make it work, ill keep trying. You should get the idea, I marked in red in the excel sheet the values which dont work.

    Best
    Attached Files Attached Files

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,431

    Re: comma vs. point

    Vielen Dank.

    One of us will take a look shortly.

  9. #9
    Forum Contributor
    Join Date
    12-11-2018
    Location
    Zurich
    MS-Off Ver
    2016
    Posts
    130

    Re: comma vs. point

    I tried to the change the settings: Use seperators not from the system but manual ones. One can find this in options --> advanced. This worked for a while. When I closed the file and reopened, it didnt work anymore. This feels like a bug. Its so unlogical that at one point it works fine and in a later userform not anymore. Also it seems that when I play around with the problem for an hour or two it changes it settings to what I want...

    Help needed here!

  10. #10
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,309

    Re: comma vs. point

    There is a confusion of formatting throughout the sheet.
    e.g. in some columns one cell is formatted 'scientific' the next 'general' followed by 'numeric' four point.
    'general' has no specific numbering format, it will try and translate what is entered, sometimes rightly, sometimes wrongly.
    Have you tried replace function (ctrl H), then format the entire area 'numeric' to whatever accuracy is required.

  11. #11
    Forum Contributor
    Join Date
    12-11-2018
    Location
    Zurich
    MS-Off Ver
    2016
    Posts
    130

    Re: comma vs. point

    This is still unsolved. When I read out the values from the excel sheet, from the cells that are formatted numerics with a point instead of a comma it still translates the points into commas.. This is killing me
    Last edited by travelkid; 05-29-2019 at 09:14 AM.

  12. #12
    Forum Contributor
    Join Date
    12-11-2018
    Location
    Zurich
    MS-Off Ver
    2016
    Posts
    130

    Re: comma vs. point

    At the end of the userform in the Initialize part I changed from Integer to Double..

    Please Login or Register  to view this content.
    This seemed to be a solution, as it wokred once but not twice .. Awesome

  13. #13
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,309

    Re: comma vs. point

    Are you referring to

    Please Login or Register  to view this content.
    I am totally confused as this seems to be some strange attempt to format a UserForm control not your worksheet.
    I am surprised if this worked once !
    I have tried to run the UserForm independently however without success as there is so much referencing missing.
    Start from the beginning,
    Put 'Option Explicit' as very first line of your code.
    Then run 'debug', and rectify each fault in turn, such as dimension 'Dim' each variable etc.

+ 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] Using comma as a decimal point
    By sjb72 in forum Excel General
    Replies: 5
    Last Post: 01-04-2018, 07:55 AM
  2. change comma with point
    By bogd1n in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-16-2016, 02:03 PM
  3. Comma-to-Point Export file
    By matthijs-ys in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-18-2015, 03:33 AM
  4. Replies: 1
    Last Post: 09-17-2014, 07:30 AM
  5. [SOLVED] Changing point to Comma
    By Chrli in forum Excel General
    Replies: 12
    Last Post: 02-11-2014, 10:57 AM
  6. formula to change comma to decimal point?
    By legepe in forum Excel General
    Replies: 6
    Last Post: 06-19-2010, 05:49 AM
  7. Decimal point/comma issue
    By Excelerate-nl in forum Excel General
    Replies: 3
    Last Post: 01-12-2006, 05:50 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