ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Input Box Default Value (https://www.excelbanter.com/excel-programming/405173-input-box-default-value.html)

Sandy

Input Box Default Value
 
Hi
How do I set the default value for an input box to the value in F13 on
"mysheet"

Thanks

Conan Kelly

Input Box Default Value
 
Sandy,

Look up "InputBox" in VBA Help.

The arguments for the InputBox function a
-prompt
-title
-default
-xpos
-ypos
-helpfile
-context

....in that order

"prompt" is the message to the user inside the box.
"title" is what shows up in the title bar of the textbox.
"default" is the default value in the box.

for example:
pstrAnswer = InputBox("Please enter a value:", "Value Needed","This is the
default value")

HTH,

Conan




"Sandy" wrote in message
...
Hi
How do I set the default value for an input box to the value in F13 on
"mysheet"

Thanks




JLGWhiz

Input Box Default Value
 
myVar = InputBox("Your Prompt Here", "Dialog Box Title Here", _
Default:=Range("F13").Value)

"Sandy" wrote:

Hi
How do I set the default value for an input box to the value in F13 on
"mysheet"

Thanks


JLGWhiz

Input Box Default Value
 
More explicit:

myVar = InputBox("Your Prompt Here", "Dialog Box Title Here", _
Default:=mySheet.Range("F13").Value)

"Sandy" wrote:

Hi
How do I set the default value for an input box to the value in F13 on
"mysheet"

Thanks



All times are GMT +1. The time now is 05:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com