• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Could somebody help me with the code of my VBA userforms(Combibox - saving - edeting of data)

19339

New Member
Hello my name is sebastiaan and i am doing an internship in an company fort hat company i am trying to make an excel file that works with userforms to keep track of the maintance of the UV machines that are installed in section 1-8 and in 9-12 and in 13-16.



Each section has 4 userforms:

Main userform: Program1_8 & Program9_12 & Program13_16

Nieuw(new) userform: Program1_81 & Program9_121 & Program13_161

Login userform: Program1_82 & Program9_122 & Program13_162

Bewerken(edit) userform: Program1_83 & Program9_123 & Program13_163



The sheets are are as following:

Main sheet: has the 3 tables that are connected tot the first Userform of each section and also connected tot the bewerken(edit) userform

Lampnumber sheets: in these sheets i was planning to save the new entries of data from the nieuw(new) userform wich would be stored in its corresponding Lampnumber sheet in the table wich are marked by colour that belongs to one of the sections



The working of the userforms should work as the following:

The main userform is connected with the corresponding table in the main sheet and you can only look through the data with the main userform and not edit any data.



The nieuw(new) userform would create an new entry of data that would be saved following the chosen Lampnumber in the corresponding table in the Lampnumber sheets in the rigth table colour that belongs to that section.



The login userform works by using the login information and once typed right it should open the bewerken(edit) userform.



The bewerken(edit) userform works by being connected to the table in the Main sheet that belongs to the corresponding section in the userform you can select the lampnumber and see all the information as you can aslo see in the Main userform only now you can edit it and save it.



Login information:

Name: Admin

Ww: 1234



The colours of the tables corresponding tot he sections are

1-8: Blue
9-12: Orange

13-16: Green



The problem that I have and I need help with is that don’t know or understand wich code I should use or need to use to make the Nieuw(new) userform work per section.

or how to make the bewerken(edit) userform work so that it saves the data on the correct table in the Lampnumber sheets.



I once asked on an other forum how to connect the combibox of Program1_8 with the table on the top of the Main sheet after wich i got an responce and an code to use i tried to edit the code so that it also works with the other userforms: Program9_12 and Program13_16 i hope that somebody could also provide me with the code for that or can explain it to me how to edit it correctly




^^^those are the probelms that i have and i hope that someone could help me with it.

My main language is not english so i hope it is readble if there are any questions about anything that is unclear feel free to ask i will responce as fast as i can.

I am looking forward to your responds thx already in forward.

Greetings,



Sebastiaan
 

Attachments

  • UV filter onderhoud 1-8 & 9-12 & 13-16.xlsm
    366.9 KB · Views: 6
Hi Sebastian,
I made an example (in Dutch:DD)
You should think about your structure.
You are using excel as a database, at least use a proper database structure.
You want to change records then you must have a unique number so that excel can find the record you want to change.
Using all these userforms, hmm, remember less is more, you only need one.
Forget about the login screen, it slows down the workflow and it annoys the users. 32 sheets for 32 lamps, this is not done.
For this assignment you only need one, I made an example with 3, 2 too much.
One extra tip avoid select and activate, it slows down the code big time en it is
rarely needed. Anyway your questions are answered now it is up to you to make your homework. And yes I am Dutch;)
 

Attachments

  • UV filteronderhoud.xlsm
    44.6 KB · Views: 12
thx for the help
of eerder gezegd bedankt :DD

the main reason for the login was that the workers where not meant to be able to edit any of the records but this is already more than i could ask for also thx for the tip of not using to many userforms.
 
Last edited by a moderator:
Back
Top