Hello,
I am brand new to Visual Basic. I have an assignment where I have to create a project that will allow a user to look up a country by its 2 letter abbreviation. The user will have the
options to Look up the Abbreviation or Look up the Country Name. In the event that a match cannot be found for the input, display an appropriate error message. Within this project I have to create a structure of country name and abbreviation and an array of structures. This is what I have so far:
Obviously I'm not even close to being done. I'm have trouble getting the array, structure and variables before the Even Procedure to work (my abbreviations and full names become underlined with "'name of country' is not declared. It may be inaccessible due to its protection level." Any help with explanations on how to get everything running would be greatly appreciated.
I am brand new to Visual Basic. I have an assignment where I have to create a project that will allow a user to look up a country by its 2 letter abbreviation. The user will have the
options to Look up the Abbreviation or Look up the Country Name. In the event that a match cannot be found for the input, display an appropriate error message. Within this project I have to create a structure of country name and abbreviation and an array of structures. This is what I have so far:
Public Class Form1 Structure CountryName Dim NameString() As String End Structure Private Country As CountryName Private NameString(,) As String = {{AQ, BS, CA, EE, FR, IE, JP, MX, NL}, {Antarctica, Bahamas, Canada, Estonia, France, Ireland, Japan, Mexico, Netherlands}} Private Sub FindButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FindButton.Click 'Find the correct match for user input and display in. Dim FullNameString, AbbNameString As String 'Establish the number of elements in the array. ReDim Country.NameString(9) 'Convert input group number to a subscript. Try FullNameString = FullNameTextBox.Text Catch ex As Exception End Try End Sub End Class
Obviously I'm not even close to being done. I'm have trouble getting the array, structure and variables before the Even Procedure to work (my abbreviations and full names become underlined with "'name of country' is not declared. It may be inaccessible due to its protection level." Any help with explanations on how to get everything running would be greatly appreciated.