VB 6 Collections

In the previous article, you learned about different types of loops and know about arrays. In VB 6, there is also a container called Collection.The collections are interesting because they have following properties: Can contain different data types Have their own index Have their own methods The collection have different types of methods to manage … Read more

VB 6 For … Each Loop

In the previous article, you learned about the For loop, however, there is another loop called For…Each loop similar to For loop.The For…Each loop is suitable to go through each item of a collection or an array. Syntax: For…Each LoopThe syntax for the For..Each loop is given below.The keywords are very much similar to for … Read more

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.SyntaxLet us discuss the For loop structure.For – keyword indicating the type of loop structure.index – a variable … 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 example above … 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, the … 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 FunctionThe syntax of the Switch() function is given below.The switch statement goes through each condition and whichever … 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 then another … 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 – UpperCase.Now code … 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 Detected!!!

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

Exit mobile version