gmahendru
02-01-2006, 01:09 AM
Dear All,
please see the following codePrivate Sub cmdCal_Click()
If Me.TextBox10.Value = "" Then
Me.TextBox10.Value = 0
If Me.Q1.Value = "" Then
Me.Q1.Value = 0
End If
Dim i As Long
Dim a As Long
i = Me.txterate.Value
a = Me.TextBox10.Value
Select Case cbodelivery
Case Is = "Ex-works"
If cboduty = "YES" Then
Me.U1.Value = a * i * 1.38 * 1.13
Else
Me.U1.Value = a * i * 1 * 1.13
End If
End Select
Me.A1.Value = Me.U1.Value * Me.Q1.Value
End SubWhen reaching "Me.A1.Value" its giving me error RUN TIME ERROR "13"...
I figure out one thing that if i change the value of 1.38 & 1.13 to whole no it works perfectly.....
Please help me where i m wrong...
Thanks in advance.
Gautam Mahendru
please see the following codePrivate Sub cmdCal_Click()
If Me.TextBox10.Value = "" Then
Me.TextBox10.Value = 0
If Me.Q1.Value = "" Then
Me.Q1.Value = 0
End If
Dim i As Long
Dim a As Long
i = Me.txterate.Value
a = Me.TextBox10.Value
Select Case cbodelivery
Case Is = "Ex-works"
If cboduty = "YES" Then
Me.U1.Value = a * i * 1.38 * 1.13
Else
Me.U1.Value = a * i * 1 * 1.13
End If
End Select
Me.A1.Value = Me.U1.Value * Me.Q1.Value
End SubWhen reaching "Me.A1.Value" its giving me error RUN TIME ERROR "13"...
I figure out one thing that if i change the value of 1.38 & 1.13 to whole no it works perfectly.....
Please help me where i m wrong...
Thanks in advance.
Gautam Mahendru