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 6932147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:40:09+00:00 2026-05-27T11:40:09+00:00

I can only find answers on this using vba or java. I am taking

  • 0

I can only find answers on this using vba or java.
I am taking a user input from a textbox and counting the number of uppercase characters given.
This is homework so if you could even point me in the right direction I would be much obliged.

Private Sub BtnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)     Handles BtnGo.Click
    Dim Phrase As String
    Dim CharPhrase As Char 'Convert Phrase to char for sting comparison
    Dim Counter As Integer = 0 'used to measure the characters in textbox
    Dim Caps As Integer = 0 'How many capitals are there?
    Phrase = TxtboxPhrase.Text
    If Phrase.Length <= 15 Then
        MsgBox("There must be at least 15 characters in textbox")
        Exit Sub
    End If
    While Counter <= Phrase.Length
'Code for counting here
    End While
    MsgBox("There are " & Caps & " capital letters in the current phrase")
    Call ProgQuit()
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-05-27T11:40:09+00:00Added an answer on May 27, 2026 at 11:40 am

    I’m a C# developer but here is the algorithm I would use in VB.NET:

    Private Function CountUpper(str As String) As Integer
    Dim ucount As Integer = 0
    
    For Each c As Char In str
        Dim charCode As Integer = AscW(c)
    
        If charCode >= 65 AndAlso charCode < 91 Then
            ucount += 1
        End If
    Next
    
    Return ucount
    End Function
    

    EDIT: I ran this code through a C# to VB converter so there may be some issues. I just fixed one obvious one.

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

Sidebar

Related Questions

This is only tangentially a programming question. Where can I find a simple-to-parse list
I've been trying to figure this out but can't find any answers to my
I can only find asynchronous iPad/objective C HTTP examples. How do I do a
I've searched the web, and I can only find marketing material on .net 4.
I'm trying to add Jumplist support to my app, but I can only find
[The only similar question I can find was answered long ago and contains a
I can't find much information on const_cast . The only info I could find
I can only assume this is a bug. The first assert passes while the
I can only think of a client-side solution using jQuery, but is it possible
I'm having this problem and I didnt find any answers on the web. I

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.