help creating dialogue windows

Z

zweed

Hi!

I just started to learn programming in Excel and I really excited abou
it.
I have this project that I want to do.
At the moment at my company we have a minor technical test we do wit
new recruits, most of the times this test is done by phone.
The sheet where the answeres are entered is a spreadsheet.
I.e there a question in cell A4 and the answer is to be typed in B4.
This takes some time, navigating the spreadsheet manually and this ca
lead to mistakes.
What I want to do is create a dialouge (is it called that?) box fo
every question. what I mean is a window that pop ups, with th
question. You write the answer in the window. Press OK and the answe
should be put in the cell where the answer should be i.e B4.
After this a new window comes up for the next question and etc unti
the test is done.

Is this something easy? difficult?

I would appreciate all kinds of help and guidance.

Thanks in advance
 
J

JulieD

Hi

wouldn't class this as too difficult although i envisage some problems, e.g.
if the person typing in the questions presses enter too quickly and skips
over a question how to get it back etc ... but once you create the basics of
what you're after you can deal with these "user challenges" (as i like to
call them).

Basically i would approach it this way ... record a macro going from cell to
cell typing in a fake answer. so you'll end up with code something like
Range("B4").Select
ActiveCell.FormulaR1C1 = "answer 1"
Range("B5").Select
ActiveCell.FormulaR1C1 = "answer 2"
etc

then to make it interactive you can use the INPUTBOX function
Range("B4").Select
ActiveCell.FormulaR1C1 = InputBox("Question 1")

OR
dim answer as string
answer = Inputbox("Question 1")
Range("B4").Select
ActiveCell.FormulaR1C1 = answer
Range("B5").Select

you can then play around with this to check the length of answers to ensure
that enter isn't being pressed without something being typed in. You'll
need to check out INPUTBOX in VBA's help to get other paramters that you can
play with.

Hope this gives you a starting point ...

Cheers
julieD
 
Top