Halloween party ideas 2015

THIS IS THE CHECKBOX 
 
<input type="checkbox" id="checkboxA"> click to disable<br>
<input type="text" id="textbox_A"> 
<input type="text" id="textbox_B">
 
 
THIS IS THE JAVASCRIPT
 
<script type="text/javascript"> 
function disablefields(){ 
if (document.getElementById('checkboxA').checked == 1){ 
document.getElementById('textbox_A').disabled='disabled'; 
document.getElementById('textbox_A').value='disabled';
document.getElementById('textbox_B').disabled='disabled'; 
document.getElementById('textbox_B').value='disabled';
}else{ 
document.getElementById('textbox_A').disabled=''; 
document.getElementById('textbox_A').value='Allowed'; 
document.getElementById('textbox_B').disabled=''; 
document.getElementById('textbox_B').value='Allowed'; 
} 
} 
</script> 







THIS IS THE PROPERTY SETTINGS FOR CONTROLS
Form1:
BorderStyle 1-Fixed Single
Caption Savings Account
Name frmSavings
Label1:
Caption Monthly Deposit
Label2:
Caption Yearly Interest
Label3:
Caption Number of Months
Label4:
Caption Final Balance
Text1:
Text [Blank]
Name txtDeposit
Text2:
Text [Blank]
Name txtInterest
Text3:
Text [Blank]
Name txtMonths
Text4:
Text [Blank]
Name txtFinal
Command1:
Caption &Calculate
Name cmdCalculate
Command2:
Caption E&xit
Name cmdExit


BELOW IS THE CODE

Dim Deposit As Single
Dim Interest As Single
Dim Months As Single
Dim Final As Single

Private Sub cmdCalculate_Click ()
Dim IntRate As Single

Deposit = Val(txtDeposit.Text)
Interest = Val(txtInterest.Text)
IntRate = Interest / 1200
Months = Val(txtMonths.Text)

Final = Deposit * ((1 + IntRate) ^ Months - 1) / IntRate
txtFinal.Text = Format(Final, "#####0.00")
End Sub

Powered by Blogger.