You are on page 1of 23

| 

î 

  
  



 




| 


î 
  

  

  



 


|  

 
 

 !      (
 "#$%& '! 
%
| 
î 

  
  
î  

  


  * î  %



  %    
% 


 ! 
%   

+

 
 


 *   !
 ,

-  %+ .    
  
/

- 
     
* 
 

 
   

|  

 
 

 !      )
 "#$%& '! 
%
| 
î 

  
î   
  



* î 


% +
  - 1

- 



 - 

* 1
 

%  



    


* 
 
2!

   +

* 
 
2!

+
 

* 
  3+
 
 
|  

 
 

 !      0
 "#$%& '! 
%
| 
î 

  
¦  
  
  


 * 1
 

% 
   
 
 


 * 
  
+
 5 
 
 
 
 
 

 3

! 
 




 * 
 ++

2!

 
 
 
!

   * 
1
 
 
 
 
 
 
+ 6
7 

*  
 
 
! 
  
 
 


*  
!  2%!

|  

 
 

 !      4
 "#$%& '! 
%
| 
î 

  
  
G  



 










  



 


|  

 
 

 !      8
 "#$%& '! 
%
| 
î 

  
  
ü  | 


  * î    


  


* 
+ 


 list1.Additem R 
 * !%  
    
  
 

* î 
  
 
 

list1.Clear

|  

 
 

 !      "
 "#$%& '! 
%
| 
î 

   |  
   
  



 

3rivate Sub cmdCalc_Click()



 Dim intTheValue As Integer

intTheValue = CInt(txtTheValue.Text)
intSum = intSum + intTheValue µintSum is form level


 intNumValues = intNumValues + 1 µform level
txtSum.Text = Str(intSum)

txtNumValues.Text = Str(intNumValues)
   lstEntries.AddItem str(intTheValue)
txtTheValue.Text = "´
 txtTheValue.SetFocus
End Sub
 


|  

 
 

 !      9
 "#$%& '! 
%
| 
î 

  

 ü
G 
  
 


    !% 
  
       
1
; 

 
 + 
1; ,

G  i      i    
i   



 i  
  
       
 i  
 ! 
 i   <   

    
  
  i   <      +   




i   <     +   



 i   <      

  
  
   
 
  i   <    +   


|  

 
 

 !      :
 "#$%& '! 
%
| 
î 

  
   ¦ G  


 






 ¦ 
 |  
|   

 



G  !  G  m    




m 

m 

m   

   
m   
 !     


 


|  

 
 

 !      =
 "#$%& '! 
%
| 
î 

  
|  
   
  
3rivate Sub cmdCalc_Click()


Dim intTheValue as Integer, intSum as Integer
 
Dim intNumValues as Integer, intCounter as Integer
intSum = 0 µInitialize Sum to Zero

 If txtNumValues.Text = "" Then ¶Number not entered

Msgbox "3lease enter number of values to be summed³
Exit Sub ¶Do not go into loop

 End if
 intNumValues = CInt(txtNumValues.Text)
For intCounter = 1 to intNumValues
 intTheValue = CInt(InputBox("Enter next value"))
  
intSum = intSum + intTheValue
lstEntries.AddItem Str(intTheValue) µAdd to list
 Next
txtSum.Text = Str(intSum)
  lstEntries.AddItem "Sum is " & Str(intSum)
 End Sub

|  

 
 

 !      ($
 "#$%& '! 
%
| 
î 

  
  






  * î
   + >    
 ./

 +  



*     
+   ./


%
 +
$  1(



*  .
/    + 


   


 * 
  + 
  
?!,

For intCounter = 0 to lstEntries.ListCount - 1
Debug.3rint lstEntries.List(intCounter)
  Next


|  

 
 

 !      ((
 "#$%& '! 
%
| 
î 

  
  
 
 

 * 
 
+
2!
+
 

 x    
x 
  


   
x

* 
% +

- @! 
   
%+


 - ? ! 
  
%+
- @! 
 
%+

  
- ? ! 
 
%+
* 
    
 +

 %
 
*      
 +

 %

|  

 
 

 !      ()
 "#$%& '! 
%
| 
î 

          
  



 
* î  +
 +   
1    ,



½  m   m 


   


  

* î  +
 +    1    ,
  
½
    
   m   m 


 


|  

 
 

 !      (0
 "#$%& '! 
%
| 
î 

  
    
  
½ 
 


            
½ J   ½ J  

  
   
 
  
   
 
   

 Ô  Ô 
  
   
 

½ 
 

             
½  J   ½  J  
 
   
 

 
   
 
   
 
Ô  Ô 

 
   
 

|  

 
 

 !      (4
 "#$%& '! 
%
| 
î 

  
  
 
 ü " #  
 G



 

* 
    
  



  
 
   


 
*      


  


 
 #

*  
+%  
A 
  % ! 

    %  
#

   *  


   +

   %

 + 
 

  +  ! 
#
* î
% ++ ,$ 
%>
  
 +

* ?!    +  #

|  

 
 

 !      (8
 "#$%& '! 
%
| 
î 

  
  
ü
!$ 
G



 
*    +   
   

  %




   %
      + 
  +
 
 2%
#
* î  
+
 
      +  +

 2!>   
     
% 
2
    +

  +    ¦G . + +/ "#
* @    ?   
  @     +


      +#
*        B 
2
  
 .

 !       


/#
* 
    + %     
 
  ;#


|  

 
 

 !      ("
 "#$%& '! 
%
| 
î 

   
  
 G

  



 
*   !  B ,

 pen ³è  for Input as #

* î   +
  +>      C>

 
 Input # R è i  R


*         + 
 

   Close #


* @   @     +
 +
Do Until EF()
  Input #, R è i  R

Loop

|  

 
 

 !      (9
 "#$%& '! 
%
| 
î  |    !  G


  
  
3rivate Sub cmdCalc_Click()


Dim intTheValue As Integer, intSum As Integer
  Dim intNumValues As Integer
pen "a:\SumData.txt" For Input As #10

 intSum = 0
 intNumValues = 0
Do Until EF(10) ¶Input to end of file

 Input #10, intTheValue

intSum = intSum + intTheValue
intNumValues = intNumValues + 1

  
lstEntries.AddItem Str(intTheValue)
Loop
txtNumValues.Text = Str(intNumValues)

txtSum.Text = Str(intSum)
lstEntries.AddItem "Sum is " & str(intSum)
 
 Close #10
End Sub
|  

 
 

 !      (:
 "#$%& '! 
%
| 
î 

   î |   
  


 *         +     
 
  #

 *      
     %  

   
1!   +     


 % %  2    ! 

!#

* B 

% +  +
      

!  

%> !          
   
 !  .  +/>  > 


 !  #  
+   &

* î        

   
 
+          >  >
   ./ 

 #

|  

 
 

 !      (=
 "#$%& '! 
%
| 
î 

  
   £  |   


 
Ñ    
  |

     
 ! "

Ñ #       
 

     !
  

   "
 Ñ 
 

 
   $
  
 
 $%  



 
! " 
 

  Ô   !
  cboMembers.RemoveItem cboMembers.ListIndex


|  

 
 

 !      )$
 "#$%& '! 
%
| 
î 

    
  


 * ;  ! #&   
  
!  
#
*  G      
1;  !   
1



; # î  
 !  
    +

  +   
#

 * î
 2% 


 

  
   
1;  ,
* !%   
  

 +
  

  



1;  #
  
* !%    ;  +
  

1
 ;   
  ;  +
  

1
; #
  * !%     

    ;
      !    #

|  

 
 

 !      )(
 "#$%& '! 
%
| 
î 

  
  
|
 ¦G



  * 
    
 % 
!   



 #
* 
  +  



  !  G
'"
      #

  
* B  + 
>

  
%
 
   +?! 


   
  
x
 
 * 
   
   2#
|  

 
 

 !      ))
 "#$%& '! 
%
| 
î 

  

 
  


 *  % 
  #
 
 
 
 ?!#

 * D 2? %   



  2  %    


 î
#î  +
  
!
  ! ? ?!#
* @    !! %  +

   
  
 
#

* @  î 
2  
     
     
 !! !  

+

 #
|  

 
 

 !      )0
 "#$%& '! 
%