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:

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
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:
Upvote 0
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:
 
Upvote 0
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:
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top