View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas[_4_] Gary Keramidas[_4_] is offline
external usenet poster
 
Posts: 226
Default Excel message box

check out inputbox function and inputbox method in vba help

--


Gary Keramidas
Excel 2003


"Rock" wrote in message
...
I am looking for help with a macro because the macro I have so far is not
close to accomplishing my desired procedure. Can you help me?

Sub MsgBoxmacro()
MsgBox "Question #1 here"
MsgBox "Question #2 here"
MsgBox "Question #3 here"
MsgBox "Question #4 here"
MsgBox "Question #5 here"
MsgBox "Question #6 here"
MsgBox "Question #7 here"
End Sub

I have seven questions in range A1:A7. I would like to create a macro that
when activated will perform the following functions. Display 1st question
(cell A1) in a message box with field below it to give the answer. After
the
question has been answered I can click stop or continue on the message
box.

If I click continue the message box will disappear. The question will be
pasted into cell B2. The answer will be pasted into B4 and a new message
box
(same format) will appear with the 2nd question in cell A2.

As long as I click continue on the message box the procedure will continue
to repeat itself with the questions and answers. For example, 2nd
question
(pasted into B6 and B8), 3rd question (pasted into B10 and B12), 4th
question
(pasted into B14 and B16), 5th question pasted into B18 and B20), 6th
question (pasted into B22 and B24), 7th question (pasted into B26 and
B28),
and then loop back to the 1st question (pasted into B30 and B32), 2nd
question (pasted into B34 and B36), 3rd question (pasted into B38 and
B40),
etc until I select stop on the message box.

If I click stop on the message box the message box will disappear. The
question will be pasted two rows below the last row with data in Column B.
The answer will be pasted two rows below the question, and the program
will
stop running.

Can you help me with this?