Visual basic programming problem. I have code but I can't get my .remove command to work and need help.?
-
Majority of the code works properly. It adds the numbers correctly but I can remove the 5th character and I need help. Public Class frmVitaCredit Private Sub btnCalculate_Click(sender As System.Object, e As System.EventArgs) Handles btnCalculate.Click Dim cardNumber As Integer, firstDigit As Integer, secondDigit As Integer, thirdDigit As Integer, fourthDigit As Integer, fullNumber As Integer 'If input is null/empty then print an error message If String.IsNullOrEmpty(txtInput.Text) Then MsgBox("Please enter the first 4 digits of the card number") txtInput.Focus() Return End If 'If input is not numeric then print an error message If Not IsNumeric(txtInput.Text) Then MsgBox("Input must be numeric") txtInput.SelectAll() txtInput.Focus() Return End If 'if input is not of length 4 then print an error message If Len(txtInput.Text) <> 4 Then MsgBox("Input must be of 4 digits") txtInput.SelectAll() txtInput.Focus() Return End If 'Convert string to number cardNumber = CInt(txtInput.Text) 'Extract the 4 digits from the input firstDigit = cardNumber \ 1000 secondDigit = (cardNumber \ 100) Mod 10 thirdDigit = (cardNumber \ 10) Mod 10 fourthDigit = cardNumber Mod 10 'determine the full card number fullNumber = CInt(txtInput.Text + CStr(firstDigit + secondDigit * 2 + thirdDigit + fourthDigit * 2)) txtCardNum.Text = CStr(fullNumber) Dim fullnumber As String = ###### fullNumber = fullNumber.Remove(4, 1) End Sub End Class
-
Answer:
where is the problem?
PecanLul... at Yahoo! Answers Visit the source
Related Q & A:
- How come I can't get into the chat rooms?Best solution by answers.help.ea.com
- How come i can't get on yahoo messenger?? have downloaded and removed several times?Best solution by Yahoo! Answers
- Why i can't get into my email?Best solution by Yahoo! Answers
- I can't get into a yahoo chatroom.Best solution by Yahoo! Answers
- I can't get any emails. What should I do?Best solution by btbusiness.custhelp.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.