Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7885953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:12:00+00:00 2026-06-03T05:12:00+00:00

I have a line of code that is working in one statement but not

  • 0

I have a line of code that is working in one statement but not the second statement. I’m not sure what I’m doing wrong, so any help would be appreciated. I am learning slowly but surely, and it is by no small margin because of the help I have found here =) The error is occuring in the intResult = intSelection x intCount line of the SECOND Do While Loop.

The blue squiggle line is under “intCount” just FYI

Dim intSelection As Integer
Dim intCount As Integer = 0
Dim intResult As Integer
Dim strDisplay As String


Private Sub txtSelection_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSelection.TextChanged

End Sub

Private Sub btnSelection_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelection.Click
    If intSelection >= 0 And intSelection <= 12 Then
        Do While AdditionToolStripMenuItem.Checked = True And intCount <= 12
            intResult = intSelection + intCount
            strDisplay = intSelection & " + " & intCount & " = " & intResult
            lstResults.Items.Add(strDisplay)
            intCount += 1
        Loop

        Do While MultiplicationToolStripMenuItem.Checked = True And intCount <= 12
            intResult = intSelection x intCount
            strDisplay = intSelection & " x " & intCount & " = " & intResult
            lstResults.Items.Add(strDisplay)
            intCount += 1
        Loop


    Else
        MsgBox("Please enter a value between 0 and 12", , "Input Error")


    End If
End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:12:01+00:00Added an answer on June 3, 2026 at 5:12 am

    intSelection x intCount should be intSelection * intCount Take a look at this MSDN page it explains the operators that are available for VB.Net

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following line of code that executes properly except for one hitch.
I'm trying to simulate some code that I have working with SQL but using
Hello I am a new one in CSS, I have next code that working
I have a line of code that gets the following error when run through
Suppose I have a line of code that starts like the following: Func1(Func2(Func3 Is
I have a line of PHP code that does the following: $xml = <xml><request>...[snipped
I have a jquery line of code that outputs some HTML to a div.
I have a line of C# in my ASP.NET code behind that looks like
Right now i have a line of code, in vb, that calls a text
I have found this line of code in a game that I study int

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.