Input N. Calculate and display sum = 1+2+…+N using a For loop.
Create a recursive function to compute factorial. Input N, display result. Exercise Set 6: File Handling 21. Write to Text File Take user input (Name, Phone) from text boxes. Append to contacts.txt using Open , Write # , Close .
Search for a name in the file and display the matching phone number.
Create two text boxes for numbers, four buttons (+, -, *, /), and a label for the result. Perform the operation and show the result. Handle division by zero with a message box.
Use text boxes and a button to insert a new record into the Access database using Recordset.AddNew .
Use four CommandButtons (Red, Green, Blue, Yellow). Clicking each changes the Form’s background color accordingly.
9 CommandButtons in a grid. Alternate X and O. Check for win or draw.
Input a name, search the recordset, and display the grade.
Ask the user how many numbers they want to enter. ReDim an array accordingly. Input values and show their sum. Exercise Set 5: Procedures & Functions 17. Function: Celsius to Fahrenheit Create a function CtoF(C) that returns Fahrenheit. Call it from a button click.
Enter a number 1–7. Using Select Case , show the corresponding weekday name. Exercise Set 3: Loops (For, Do While, Do Until) 9. Multiplication Table Input a number from the user. Show its multiplication table from 1 to 10 in a ListBox.
Display all even numbers between 1 and 50 in a ListBox using a loop. Exercise Set 4: Arrays & Lists 13. Student Average Allow entry of marks for 5 subjects into an array. Compute total and average. Display each subject mark and the average.
Fill an array with numbers 1–5. Display original, then display reversed order.
Stay up to date with our technology updates, events, special offers, news, publications and training
Input N. Calculate and display sum = 1+2+…+N using a For loop.
Create a recursive function to compute factorial. Input N, display result. Exercise Set 6: File Handling 21. Write to Text File Take user input (Name, Phone) from text boxes. Append to contacts.txt using Open , Write # , Close .
Search for a name in the file and display the matching phone number.
Create two text boxes for numbers, four buttons (+, -, *, /), and a label for the result. Perform the operation and show the result. Handle division by zero with a message box. visual basic 6.0 practical exercises pdf
Use text boxes and a button to insert a new record into the Access database using Recordset.AddNew .
Use four CommandButtons (Red, Green, Blue, Yellow). Clicking each changes the Form’s background color accordingly.
9 CommandButtons in a grid. Alternate X and O. Check for win or draw. Input N
Input a name, search the recordset, and display the grade.
Ask the user how many numbers they want to enter. ReDim an array accordingly. Input values and show their sum. Exercise Set 5: Procedures & Functions 17. Function: Celsius to Fahrenheit Create a function CtoF(C) that returns Fahrenheit. Call it from a button click.
Enter a number 1–7. Using Select Case , show the corresponding weekday name. Exercise Set 3: Loops (For, Do While, Do Until) 9. Multiplication Table Input a number from the user. Show its multiplication table from 1 to 10 in a ListBox. Input N, display result
Display all even numbers between 1 and 50 in a ListBox using a loop. Exercise Set 4: Arrays & Lists 13. Student Average Allow entry of marks for 5 subjects into an array. Compute total and average. Display each subject mark and the average.
Fill an array with numbers 1–5. Display original, then display reversed order.
© 2026 Southern Metro Path