I am completing a unit as part of my A Level Course for IT, this unit involves using VB in Excel to produce a 'Questionnaire' type document. It must consist of a User Interface AND must be able to record data and chart results after.
As a validation rule to avoid users from leaving questions out during the questionnaire, I have used a 'Text Box' and a 'Command Button'. The command button is using a code where if no answer is detected in the text box. The Button will not appear.
Problem is... How can I retrieve the data inputted from the button upon submission. (I need a way of copying the cell data, like when you input data into a cell and then wish it to copy itself into another you would use '=CELLREF'. Can I do this with text/input boxes?
Also, does anyone know if validation rules can be put on these input boxes? so I can things such like 'Please enter an age between 18 - 21'?
Any help is greatly appreciated!
Thank You!
Tom
Since values are being entered on the sheet itself, I would consider using a Worksheet_Change event that looks at the cell where an answer was entered, and ENABLES the button. The Buttons are only enabled in order this way, and the final button only appears when the previous ones have been. Just an idea.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
pl attach sample file.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks