B bconner Registered User. Local time Today, 13:04 Joined Dec 22, 2008 Messages 183 Apr 23, 2009 #1 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 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....
K Kafrin Database Designer Local time Today, 19:04 Joined Feb 17, 2009 Messages 149 Apr 23, 2009 #2 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
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