You are on page 1of 4

Experiment No. 5 Visual Basic Application for Banking System 1.

Objective(s): The activity aims to know about the different commands for creating, deleting and printing a workbook. 2. Intended Learning Outcomes (ILOs): The students shall be able to: 2.1 Have an idea for the commands of creating, deleting and printing a workbook. 2.2 Know the different commands to create, delete, and print a workbook for easily and for the good work of the program. 2.3 Understand what the importance of the different command for the program. 2.4 Understand how to create a program with a combination of loops and the commands for creating, deleting and printing workbook. 3. Discussion (not more than 300 words): In creating this program we use user form, to open a branch first create an excel files with corresponding branch names, and then in the main program use the code and the branch names file location. We use if else statement to alphabetize the worksheets, and to put a password in a worksheet we declare a x and y variable as a string and we use the worksheet.protect method. To delete a choose account we use sheets.delete and to print a choose account we use sheets.printout. 4. Resources: Computer VBA Excel 5. Procedure: 1. Click Start, then click Microsoft Excel 2. Open the visual basic editor 3. To create a module, on the main menu, click Insert then module 4. click the userform 5. make a workbooks with branch name 6. type these code in the userform1 Private Sub CommandButton1_Click() Branch.Show End SubPrivate Sub UserForm_Click() End Sub * For the branches Private Sub Caloocan_Click() Workbooks.Open Filename:="C:\Users\Ferrer\Desktop\PROGRAM\Caloocan Branch.xlsm" Branch.Hide BPI.Hide condition.Show End Sub

Hide condition.xlsm" Branch.Hide BPI.Show End Sub Private Sub Quezon_Click() Workbooks.xlsm" Branch.xlsm" Branch.Private Sub Makati_Click() Workbooks.PrintOut End Sub Private Sub CommandButton2_Click() Dim x As String Dim y As String x = InputBox("Enter Password: ") .Hide BPI.Show End Sub Private Sub UserForm_Click() End Sub 7.Show End Sub Private Sub Marikina_Click() Workbooks.xlsm" Branch.Show End Sub Private Sub Pasig_Click() Workbooks.Open Filename:="C:\Users\Ferrer\Desktop\PROGRAM\Quezon Branch.Hide condition.Hide condition.Open Filename:="C:\Users\Ferrer\Desktop\PROGRAM\Pasig Branch. to print Private Sub CommandButton1_Click() Dim x As String x = InputBox("What sheet name? ") Sheets(x).Hide condition.Open Filename:="C:\Users\Ferrer\Desktop\PROGRAM\Makati Branch.Hide BPI.Hide BPI.Open Filename:="C:\Users\Ferrer\Desktop\PROGRAM\Marikina Branch.

Name For m = n To y If Sheets(m). Data and Results: Experiment No. 6. Argel Linard F.: Group Members: Ferrer. Alexa Ray Fernando .Count For n = 1 To y x = Sheets(n).y = InputBox("What sheet name do you want to put password ?") Worksheets(y).: 5 Section: EC31FB1 Date Performed: 8/18/13 Date Submitted: 8/19/13 Instructor: Engr. Reynado E.Move before:=Sheets(n) Next End Sub Course: ECE400L2 Group No. Yzac Kristopher Almoradie.Name < x Then x = Sheets(m).Protect Password:=(x).Delete End Sub Private Sub UserForm_Click() End Sub 8. Mabaga. AllowFormattingCells:=True End Sub Private Sub CommandButton3_Click() Dim a As String a = InputBox("Which sheet do you want to delete? ") Sheets(a).Name End If Next Sheets(x). Type these codes to make the worksheets alphabetize Sub aaa() Dim x As String Dim y As Integer y = Sheets.

7.Thus the experiment teaches you about the techniques of combining loop command for the good program? Perfect . sort and etc. a workbook and worksheet. add.Thus the experiment have a purpose to built your creative thinking in making good program? . move.Thus the experiment gave you an idea about the commands of creating. 8. deleting and printing a workbooks. hide. deleting and printing a workbook is not only for manually do only.Thus the experiment is good enough for the new topic? Perfect . deleting and printing workbook? Very Good . save. copy the content. and you can make use this command to make a good program that needs a creating. There are also a command to open. but there’s a command for doing it. Conclusion: I therefore conclude that creating. protect. Assessment (Rubric for Laboratory Performance): Good .