+ Reply to Thread
Results 1 to 11 of 11

VBA Data Entry Form ComboBox turn my dot into coma

  1. #1
    Registered User
    Join Date
    05-13-2020
    Location
    Gulu, Uganda
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    VBA Data Entry Form ComboBox turn my dot into coma

    I have a data entry form (activities) with a ComboBox that allow to select data from a name of a range of cell itself coming from another data entry form (ouputs). More precisely, after entering the outputs with their reference number (for instance 1.2), it automatically assigne a name to all the reference numbers of the outputs. Then these reference numbers are used in the new form in the ComboBox.

    It all works very well except the fact that when I enter the reference number with a dot (e.g. 1.2), while the dot still appear in the list for selection in the ComboBox, it becomes a coma once saved in the sheet (e.g. 1,2), and it highly disturbs me as I need the dot to use the variables later on.

    It is worth mentioning that as I am a beginner with coding macros I have followed a tutorial to do the work, and the dude didn't define any variable. I have a feeling that something could be done with defining the variable as string, but all my attempts have failed so far.

    here is the code in the first form

    Please Login or Register  to view this content.
    and here is the relevant one in the second form

    Please Login or Register  to view this content.
    Many thanks to whoever can help

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,229

    Re: VBA Data Entry Form ComboBox turn my dot into coma

    Hi Gagahoučte

    Welcome to the Forum...
    First check your PC settings...Change decimal comma to decimal point
    If you prefer not to then you can replace the comma with a point such as...
    Please Login or Register  to view this content.
    Your code can also be simplified...Not wise to make use of select or activate unless really required...

    Perhaps you should upload a sample file..see top yellow banner...
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    05-13-2020
    Location
    Gulu, Uganda
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: VBA Data Entry Form ComboBox turn my dot into coma

    Hi sintek,

    Thanks a lot for your answer. I have attached a file as you kindly asked for it and thank you in advance for your support. I have indeed read that select and activate are not the best, but as I mentioned I followed a tuto and didn't have time to work on improving the code myself as my little skills would require lots of work.

    Regarding your solution, as my computer is in French it could indeed be the issue, yet I don't necessarily want to change the settings, so I will probably use the other solution. I am busy with something else now but will tr later, unless you find a quick solution for me

    Maybe to clarify on the document, it is made for local organisations in Uganda to track projects progress that they are implementing, therefore I am trying to make it as simple as possible. It is important that the three steps of registering the outcomes, outputs and activities remain.

    I have just hidden the sheets where they need to record activities and can track the progress. I didn't remove them as the document doesnt contain confidential information. I have filled it with fake once so that you can see what the idea is if you are not familiar with development projects.

    Please also note that it is not in it final version yet as I need to improve on entering the variables, notably an option to correct entries without having to modify in the tables themselves. I want to avoid as much as possible that users touch anything in the table to make sure they dont mess with them.

    many thanks for your support

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,229

    Re: VBA Data Entry Form ComboBox turn my dot into coma

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by sintek; 05-13-2020 at 05:42 AM.

  5. #5
    Registered User
    Join Date
    05-13-2020
    Location
    Gulu, Uganda
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: VBA Data Entry Form ComboBox turn my dot into coma

    Awesome thanks a lot!

  6. #6
    Registered User
    Join Date
    05-13-2020
    Location
    Gulu, Uganda
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: VBA Data Entry Form ComboBox turn my dot into coma

    Hi sintek,

    works perfectly thanks, but I have another small issue. I used the same code for a new form but I need some data to be considered as numbers and not text so that they can be summed. How can I do that within the code you shared?

    Thanks a lot

  7. #7
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,229

    Re: VBA Data Entry Form ComboBox turn my dot into coma

    Upload sample file...Gonna have issues with those decimal point settings perhaps...
    I cannot replicate as my settings are correct...
    When entering this data is it entered as integers or decimals

    Not sure what your setup is so difficult to say...Can always force value i.e
    Please Login or Register  to view this content.
    Last edited by sintek; 05-13-2020 at 12:04 PM.

  8. #8
    Registered User
    Join Date
    05-13-2020
    Location
    Gulu, Uganda
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: VBA Data Entry Form ComboBox turn my dot into coma

    It is in the sheet Activities. The number of beneficiaries should automatically report in the sheet LF_Project but they don't when I insert them with the formular. If I do it manually it works (which I did for row 9 versus row 8 that was entered with the formular.

    again, thanks a lot
    Attached Files Attached Files

  9. #9
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,229

    Re: VBA Data Entry Form ComboBox turn my dot into coma

    Just add the red snippets to those variables...

    Please Login or Register  to view this content.
    Last edited by sintek; 05-13-2020 at 02:35 PM.

  10. #10
    Registered User
    Join Date
    05-13-2020
    Location
    Gulu, Uganda
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: VBA Data Entry Form ComboBox turn my dot into coma

    haaaa I was almost there thanks a lot, it works perfectly now

  11. #11
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,229

    Re: VBA Data Entry Form ComboBox turn my dot into coma

    Pleasure...
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED...
    Tx for rep +

+ 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. Replies: 3
    Last Post: 09-24-2013, 11:01 AM
  2. Turn Access Form into Method for Data Entry
    By cheal2 in forum Access Tables & Databases
    Replies: 5
    Last Post: 06-13-2013, 11:31 AM
  3. Replies: 2
    Last Post: 06-07-2013, 09:08 AM
  4. Test combobox entry to populate next textbox in same form
    By regupnorth in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2012, 02:22 PM
  5. Transfer User form data to a worksheet w.r.t. combobox item on the form
    By nm766 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2011, 12:43 PM
  6. Data Entry Form (similar to default Excel Data>Form)
    By tonydm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-11-2005, 02:59 PM
  7. Using a ComboBox for Data Entry into a Cell
    By Jon Turner in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-27-2005, 05:05 PM
  8. Replies: 4
    Last Post: 01-08-2005, 02:06 PM

Tags for this Thread

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