View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default No clue whatsoever, so thought I'd ask the experts

How about:

Sub AskMeNoQuestions()
Dim s(3)
s(0) = "What is the meaning of life?"
s(1) = "How many neutrinos are there in the universe?"
s(2) = "Why are the key pads on phones and computer keyboards different?"
For i = o To 2
x = Application.InputBox(prompt:=s(i), Type:=2)
j = i + 1
Cells(j, 1).Value = s(i)
Cells(j, 2).Value = x
Next
End Sub
--
Gary''s Student - gsnu200829


"Paul" wrote:

Many years ago a colleague of mine created a program (or I think it was some
sort of VBA?) when I opened Excel (or Word) where a window would pop up,
asking me a question, to which I woudl type the data/answer. After all the
questions were answered, the program finished, then it put the data into
specific cells/tables...I found it fascinating but never knew how it was done.

I have a spreadsheet with a column of data, which is generally a title of a
topic or a question. To the right of the data is the answer to the left
column.

Simply put, if I had : -

Cell A1 as "What is your name", then Cell B1 would be "Paul"
Cell A2 as "Where do you live", then Cell B2 would be "England"

...etc, etc until all my Cells/Lines are complete.

Now...what I would like to do is use a "looping" program (if there is such
thing) to prompt a window to pop up (like a Userform) with a Label "What is
your Name" and a Text Box so I can type the answer "Paul".

I then want this to loop over and over again, so maybe a "Next" Command
Button needs to be there (and maybe, Previous, Close etc), this then prompts
the next question "Where do you live", which will input the data "England" on
the next line and so on and so on.

How would this be done?

Hope I've explained it OK. Hope you can help

Regards
Paul