Need Input Box and then Reference value entered

bconner

Registered User.
Local time
Today, 13:04
Joined
Dec 22, 2008
Messages
183
I need to create an Inputbox using VBA Code and prompt the user for a value. Once the value is entered I want to be able to right an If statement that says If the value entered into the Input box is Y then perform this action....
 
I assume you have a specific event for this to go in...

The InputBox function has these arguments:
InputBox(Prompt As String, Title As String, DefaultValue, several other arguments to do with position etc)

Code:
Dim Ans As String
 
Ans = InputBox("Please enter [whatever it is you're asking for].",,"N")
 
If Ans = "Y" Then
...
End If
 

Users who are viewing this thread

Back
Top Bottom