Msg Box input string

  • Thread starter Thread starter Exdevon
  • Start date Start date
E

Exdevon

Can anyone advise me the macro code to create a msg box having a space
for the user to input a text string which can then be used for
subsequent processing?
Thanks, Exdevon
 
It's not the Msgbox() statement you need, it's
Input() that you need, like so..
In VBA code
ans = Input("Enter your Name") << see help for more
 
Hi Exdevon,
Use either VB's InputBox function or Excel's Application.Inputbox
function.
Application.InputBox is convenient because you can specify the input
with the Type argument, Type:=2 causes input that is not text string to
be rejected.
Ken Johnson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top