0

I am trying to save customer details to later down the line recall them to display and also to sort them.

i have tried a few things but at the moment i am sitting at a wall that i can not get over.

It is giving me an error by this line of code:

arrEmail(intCount) = Convert.ToDecimal(txtEmail.Text)

this is the code i have at the moment

Dim arrName() As String = {}
Dim arrSurname() As String = {}
Dim arrID() As Decimal = {}
Dim arrPhoneNum() As Decimal = {}
Dim arrEmail() As Decimal = {}
Dim arrCustomerNum() As Decimal = {}
Dim intCount As Integer

Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
    Dim outFile As IO.StreamWriter
    Dim intValues As Integer

    ReDim arrName(intCount)
    ReDim arrSurname(intCount)
    ReDim arrID(intCount)
    ReDim arrPhoneNum(intCount)
    ReDim arrEmail(intCount)
    ReDim arrCustomerNum(intCount)

    arrName(intCount) = Trim(txtName.Text.ToUpper)

    arrSurname(intCount) = Trim(txtSurname.Text.ToUpper)

    arrID(intCount) = Convert.ToDecimal(txtID.Text)

    arrPhoneNum(intCount) = Convert.ToDecimal(txtPhoneNum.Text)

    arrEmail(intCount) = Convert.ToDecimal(txtEmail.Text)

    arrCustomerNum(intCount) = Convert.ToDecimal(txtCustomerNum.Text)
    intCount += 1

0 Answers0