How to create user form under VBA for entering data

chintamaniavinash

New Member
Joined
Sep 18, 2020
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hello friends,
I want to enter data in sheet 1 using user form having based of VBA coding. My requirement is that,

1. I want button on sheet 1 by the name 'Enter Data'. When i click on that button user form will be open up.

2. I have table in sheet 1 in which i want to enter data. Fields in the table are [a] Sr. No. [B] Date [c] Name of the Category [d] Items under Category [e] Quantity.

3. Important thing is that, menu of '[d] items under category' is dependent to '[c] Name of the Category'.

I have following three categories in my shop: Fruits, Vegetables and Dry Fruits.
Under each of the category following items are includes:
Fruits: Apple, Orange, papaya, grapes and Kivi.
Vegetables: Ladyfinger, coli-flower, cabbage and eggplant
Dry fruits: Almonds, cashews, walnuts, pistachio and dates.

Under this i want dependent list. Means if i click on Fruits, in the next cell list of fruits should be auto-populated so that i can select one them. If i select vegetables then in the next cell list of vegetables should be auto-populated so that i can select one of them, and so on in case of Dry fruits. But if i go to previous cell of '[c] Name of the Category' then next cell should be automatically changed its options as per previous cell on which it is dependent.

4. Data entry in sheet 1 is expected to be start from
cell A4 for [a] Sr. No., Cell B4 for [ B] Date, C4 for [c] Name of the Category, Cell D4 for [d] Items under Category, E4 for [e] Quantity.
If possible Sr. no. should be auto-populated.

5. Date should in the format dd-mm-yyyy

6. I also need following functions / buttons / options on user from: Add Data, Search Data, Edit Data, Delete Data.

6. If possible under Search Data options, search can be done by various criteria as per [a] Sr. No. [ B] Date [c] Name of the Category [d] Items under Category [e] Quantity.

7. Some times Quantity remains in decimal form e.g. 11, 12.50 which should not be changed. Means 12.50 should be 12.50 and not 12.5

I have also attached file for understanding of table.

Thank you for your help in advance. This will be your great help.
 
Last edited by a moderator:

Some videos you may like

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
47,887
Office Version
  1. 365
Platform
  1. Windows
Cross posted multiple sites

While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered elsewhere.

Please supply links to all sites where you have asked this question.
 
Last edited:

chintamaniavinash

New Member
Joined
Sep 18, 2020
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hello friends,
I want to enter data in sheet 1 using user form having based of VBA coding. My requirement is that,

1. I want button on sheet 1 by the name 'Enter Data'. When i click on that button user form will be open up.

2. I have table in sheet 1 in which i want to enter data. Fields in the table are [a] Sr. No. [B] Date [c] Name of the Category [d] Items under Category [e] Quantity.

3. Important thing is that, menu of '[d] items under category' is dependent to '[c] Name of the Category'.

I have following three categories in my shop: Fruits, Vegetables and Dry Fruits.
Under each of the category following items are includes:
Fruits: Apple, Orange, papaya, grapes and Kivi.
Vegetables: Ladyfinger, coli-flower, cabbage and eggplant
Dry fruits: Almonds, cashews, walnuts, pistachio and dates.

Under this i want dependent list. Means if i click on Fruits, in the next cell list of fruits should be auto-populated so that i can select one them. If i select vegetables then in the next cell list of vegetables should be auto-populated so that i can select one of them, and so on in case of Dry fruits. But if i go to previous cell of '[c] Name of the Category' then next cell should be automatically changed its options as per previous cell on which it is dependent.

4. Data entry in sheet 1 is expected to be start from
cell A4 for [a] Sr. No., Cell B4 for [ B] Date, C4 for [c] Name of the Category, Cell D4 for [d] Items under Category, E4 for [e] Quantity.
If possible Sr. no. should be auto-populated.

5. Date should in the format dd-mm-yyyy

6. I also need following functions / buttons / options on user from: Add Data, Search Data, Edit Data, Delete Data.

6. If possible under Search Data options, search can be done by various criteria as per [a] Sr. No. [ B] Date [c] Name of the Category [d] Items under Category [e] Quantity.

7. Some times Quantity remains in decimal form e.g. 11, 12.50 which should not be changed. Means 12.50 should be 12.50 and not 12.5

I have also attached file for understanding of table.

Thank you for your help in advance. This will be your great help.
message posted to:
 

chintamaniavinash

New Member
Joined
Sep 18, 2020
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hello friends,
I want to enter data in sheet 1 using user form having based of VBA coding. My requirement is that,

1. I want button on sheet 1 by the name 'Enter Data'. When i click on that button user form will be open up.

2. I have table in sheet 1 in which i want to enter data. Fields in the table are [a] Sr. No. [B] Date [c] Name of the Category [d] Items under Category [e] Quantity.

3. Important thing is that, menu of '[d] items under category' is dependent to '[c] Name of the Category'.

I have following three categories in my shop: Fruits, Vegetables and Dry Fruits.
Under each of the category following items are includes:
Fruits: Apple, Orange, papaya, grapes and Kivi.
Vegetables: Ladyfinger, coli-flower, cabbage and eggplant
Dry fruits: Almonds, cashews, walnuts, pistachio and dates.

Under this i want dependent list. Means if i click on Fruits, in the next cell list of fruits should be auto-populated so that i can select one them. If i select vegetables then in the next cell list of vegetables should be auto-populated so that i can select one of them, and so on in case of Dry fruits. But if i go to previous cell of '[c] Name of the Category' then next cell should be automatically changed its options as per previous cell on which it is dependent.

4. Data entry in sheet 1 is expected to be start from
cell A4 for [a] Sr. No., Cell B4 for [ B] Date, C4 for [c] Name of the Category, Cell D4 for [d] Items under Category, E4 for [e] Quantity.
If possible Sr. no. should be auto-populated.

5. Date should in the format dd-mm-yyyy

6. I also need following functions / buttons / options on user from: Add Data, Search Data, Edit Data, Delete Data.

6. If possible under Search Data options, search can be done by various criteria as per [a] Sr. No. [ B] Date [c] Name of the Category [d] Items under Category [e] Quantity.

7. Some times Quantity remains in decimal form e.g. 11, 12.50 which should not be changed. Means 12.50 should be 12.50 and not 12.5

I have also attached file for understanding of table.

Thank you for your help in advance. This will be your great help.
Message also posted for responses:
 

Watch MrExcel Video

Forum statistics

Threads
1,112,767
Messages
5,542,422
Members
410,550
Latest member
ganeshsamant
Top