Hello,
i have a problem making this function to boolen.
I want to make if boolen is false then to return back to main sub, not to continue with next stuff in code
Code:
Public Function InputBoxTest()
inputData = InputBox("What is your select?" & vbCrLf & "You will need to write again the select number" & vbCrLf & "This will generate automatic the design view in the end.", "Select ID")
If inputData = "" Then
'MsgBox inputData
MsgBox "Please enter some number"
Exit Function
End If
End Function
Code:
Public Function InputBoxTest() as Boolean
Dim permit As Boolean
inputData = InputBox("What is your select?" & vbCrLf & "You will need to write again the select number" & vbCrLf & "This will generate automatic the design view in the end.", "Select ID")
If inputData = "" Then
permit = False
MsgBox "Please enter some number"
Else
permit = True
End If
InputBoxTest=permit
End Function
I'm not sure do i make it correct.
and in my main form code when press button, if InputBoxTest returns false then to return back in sub.
Code:
Private Sub Command21_Click()
if InputBoxTest = False Then
Exit Sub
End if
End Sub