Value in a inputbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!
If i have a value like name in a variable
can't i get this value into a inputbox, like "is this name correct?"
and if isn't correct i can write a new name in the inputbix?

regards alvin
 
A message box is probably a better option. The code would be similar to this...

dim intReturnValue as integer

intReturnValue = msgbox("Is the name " & myVariable & " Correct?", vbYesNo,
"Confirm Name")

if intreturnvalue = vbyes then
...
else
 
Sub AAA()
Dim sName As String
sName = "Smith"
sName = InputBox(Prompt:="Is this Name correct" & _
vbNewLine & "Please correct if wrong", _
Title:="Name Check", _
Default:=sName)
MsgBox sName
End Sub
 

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