+ Reply to Thread
Results 1 to 9 of 9

having issue coding a form to write data to cells

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    tn
    MS-Off Ver
    excel 2010
    Posts
    7

    Question having issue coding a form to write data to cells

    I have an existing excel ws where we log our orders. I have created a form and it looks great and it opens automatically and everything I want it to do EXCEPT writing the data to the ws from the form. If anyone can help, I can either email or upload the ws and I can provide more info on what I need it to do. Any help at this point would be the awesome

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: having issue coding a form to write data to cells

    Hi, dpandk,

    maybe you should attach a sample.

    What the button would do: search for the first empty row on the sheet, copy the contents of whatever information you gave entered into the columns, clear the input for the next entry. Without knowing about the name of the elements on the form and the columns where to put the information any example will not be right to the point.

    Ciao,
    Holger

  3. #3
    Registered User
    Join Date
    09-05-2012
    Location
    tn
    MS-Off Ver
    excel 2010
    Posts
    7

    Re: having issue coding a form to write data to cells

    Order Log.xlsm

    I have attached my ws here. Thank you! Please let me know what I need to do. The cells in col a are the file numbers we assign to our orders. i would like for that to show in the form but can't get it to go there for new records and just don't get how to make the info write from the form to the ws after input. Any help would be great. I know this is probably simple for others but my excel exp is a little more limited. Thank you!

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: having issue coding a form to write data to cells

    Hi, dpandk,

    sorry it took some time (not because of your workbook but because of the travelling time I spent).

    Most of the problems in the code occurred because you renamed the controls after some of the code had been written. If you rename them prior to doing so the proper names will be used but VBA will not update any altering to controls in the code - you must do them all by yourself manually. As a hint: please check out RVBA Naming Conventions on how to maybe name the controls for an easier way of identification what kind of control you use for which purpose.

    I changed your form to show 2 more labels (one for the order number on the top right, and one for the row number in the lower left which should be made invisible for real-time use). Right now you can only place a new order if the form is opened (thatīs from my bad coding for the time being), if you have used either previous or next due to the values being assigned to lblRow thereīs no way to a new record (but that is very easy to assign).

    Please check the code within if it is what you think you may need.

    Ciao,
    Holger
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-05-2012
    Location
    tn
    MS-Off Ver
    excel 2010
    Posts
    7

    Re: having issue coding a form to write data to cells

    OMG this is awesome...the drop down box isn't filling the correct cell....and clicking next goes back to first order....in the code the cell value "11" is for 2 cells, so i changed the last one to 12 which fixed that. just need the next button to work and the auto open (which i can get from the original code). I can't thank you enough!

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: having issue coding a form to write data to cells

    Hi, dpandk,

    Iīm sorry I mixed a couple of things up. Can you fix it on your own or do you need some more help on that?

    Ciao,
    Holger

  7. #7
    Registered User
    Join Date
    09-05-2012
    Location
    tn
    MS-Off Ver
    excel 2010
    Posts
    7

    Re: having issue coding a form to write data to cells

    i got the cells working right i will figure out how to make the next button work Can't thank you enough really, really helps so much!

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: having issue coding a form to write data to cells

    @ dpandk

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  9. #9
    Registered User
    Join Date
    09-05-2012
    Location
    tn
    MS-Off Ver
    excel 2010
    Posts
    7

    Re: having issue coding a form to write data to cells

    Ok, thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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