Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Value in a inputbox

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Value in a inputbox

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
---
endif

"Alvin Hansen" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Value in a inputbox

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

--
Regards,
Tom Ogilvy

"Alvin Hansen" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Value in a inputbox

Thanks again tom its working

regards
alvin


"Tom Ogilvy" skrev:

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

--
Regards,
Tom Ogilvy

"Alvin Hansen" wrote in message
...
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
InputBox peyman Excel Discussion (Misc queries) 4 September 28th 07 04:53 PM
InputBox GeorgeJ Excel Discussion (Misc queries) 5 July 12th 07 01:20 AM
inputbox brownti via OfficeKB.com Excel Discussion (Misc queries) 2 February 9th 07 02:37 PM
Inputbox and Application.InputBox Maria[_7_] Excel Programming 1 September 20th 04 11:36 AM
Inputbox sadik Excel Programming 3 February 19th 04 07:14 PM


All times are GMT +1. The time now is 05:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"