December 10th, 2012, 12:11 AM
Coding using Functions
I need some help writing a code for this question. I am using Visual Basics 2010 Express Edition
Write the code for a function that prompts the user to enter the name of a state and then returns the userís response. Name the function GetState. Then write a statement to invoke the GetState function. Display the functionís return value in a message box.
December 11th, 2012, 03:11 AM
Maybe that I don't have really understood your question, and I'm not sure this works also in VB.Net 2010, but however try this code below:
It's really easy, isn't it?
Public|Private Function GetState() As String
GetState = InputBox("Enter the Country you come from:")
'and the you call like this