VB 6 For Loop

The For loop is another simple loop structure, which is different from other loops like Do loop and While Loop because it specifies a range before the loop could start. The syntax for the For loop is given below. Syntax Let us discuss the For loop structure. For – keyword indicating the type of loop … Read more

VB 6 Do Loop

Loops are very important when you want to repeat some code block. In previous example, we saw how while loop works. In this article, you will learn about Do loop. There are two types of Do loop in VB 6 that you are going to see. Syntax for each type is given below. In the … Read more

VB 6 – Choose() Function

The VB 6 Choose() function is another function that let you choose values based on an index. However, do not confuse it to be an array. The Choose () function is very useful in menu based program where you can display a menu and let user input there choice. When the user makes a choice, … Read more

VB 6 – Switch Function

The Switch() function works similar to If-Then-Else construct, but in a different way. The function checks few conditions and if one of the condition is passed, then the statement corresponding to that condition is evaluated or displayed. Syntax: Switch Function The syntax of the Switch() function is given below. The switch statement goes through each … Read more

VB 6 While Loop

Like many programming languages out there, VB 6 also has loop control statements. In this article, you will learn about While loop which helps in repeating a block of code until loop is terminated. Syntax: While Loop The general structure of while loop is given below. The condition is very important in while loop because … Read more

VB 6 Select-Case

In the previous article, you have learned about the if-then-else statements and how you can build a program in VB 6 that work on conditions. The problem with if-then-else structure is that it is very difficult to keep a track of all codes. The Select-Case is a VB 6 feature that allows to select a … Read more

VB 6 – If…Then…Else Statements

The conditional statements are very important to any programming language. In VB 6, the conditional statement change the direction of the program using If…Then …Else construct. The syntax for If…Then…Else is given below. If you look at the above syntax , the conditions are very important for If statements. If the condition 1 is false … Read more

Converting String to Number

In VB 6, you need to accept numbers from Textbox controls and then manipulate the values and return the output to another Textbox for display. There is no problem if the entire operation happens on strings. However, the input values from a Textbox control is not always a string, it can be a number. The … Read more

VB 6 – UCase() and LCase()

In Visual Basic 6, there are two important functions to change a string to uppercase or lowercase. In this example, you will build a small application that takes a string and returns uppercase or lowercase version depending on user choice. Program Code: UCase () and LCase() First look at the code for first button – … Read more

VB 6 – StrComp()

The strComp() function is a string handling function that compares two given string and returns an integer value. If the strings are same, a 0 is returned and if they are different then -1 is returned. Example Program Code: StrComp() Output: StrComp()

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.