1 / 5

LIST BOX Control

LIST BOX Control. . for producing a list of output items . and selecting an item for subsequent processing lstboxname.additem “bananas” - adds bananas to list lstboxname.removeitem 14 - removes 15th item from list lstboxname.clear - removes all items from list. COMBO BOX Control.

hayden
Download Presentation

LIST BOX Control

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LIST BOX Control . for producing a list of output items . and selecting an item for subsequent processing lstboxname.additem “bananas” - adds bananas to list lstboxname.removeitem 14 - removes 15th item from list lstboxname.clear - removes all items from list

  2. COMBO BOX Control . for entering data by typing in or . selecting from a pre-defined list

  3. Place controls on form 1 x List Box, 1 x Combo Box 2 x Command Buttons , 2 x Text Boxes Private Sub Form_Load () For r = 0.05 to 0.15 step 0.01 cborate.additem ( r ) Next r cborate.listindex = 3 End Sub Sub cmdexit_click ( ) end End Sub

  4. Cmdupdateschedule_click () [Pseudocode] 1. Obtain values for years, loan amount and rate from appropriate controls on the form. 2. Clear the list box. 3. Compute payment = pmt (rate, nper, pv) rate= monthly interest rate nper = no. of months pv = loan amount 4. Set opening balance = loan amount 5. For month = 1 to (years x 12) 5.1 Compute monthlyinterest = balance *rate/12 5.2 Compute monthlyprinciple = payment - monthlyinterest 5.3 Compute balance = balance - monthlyprinciple 5.4 Add month no, payment, and three computed amounts to box (lstpayments.additem period, payments, balance, principle, interest) 5. 5 Next month

More Related