input boxes in Excel VBA to ask a user to enter details and save in every cell

VBABEGINER

Well-known Member
Joined
Jun 15, 2011
Messages
1,232
Hello All,

I want vba code. Ask question using Input box and the type answer should place into cell starting from cell a2, b2 and so on..

input box Q.1. Enter ur first name? … answer of this should go in a2.
input box Q.2. Enter ur last name? … answer of this should go in b2.
input box Q.3. Enter ur age? … answer of this should go in c2.
.
.
.
input box Q.10. Enter ur current city name? … answer of this should go in j2.


If suppose user clicked on cancel button on any question of input box, he/she should prompted the same question again until the value not entered.

Pls advise vba code..
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
A better option would be to use a UserForm, you could add the necessary TextBoxes and until you press a button, the data would go to the sheet:

1588898429098.png
 
Upvote 0

Forum statistics

Threads
1,214,535
Messages
6,120,093
Members
448,944
Latest member
SarahSomethingExcel100

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