Drofder2004
Technical User
I have a small amount of code for a very basic set of calculations, I just need to make a label limit to only 2 decimal places after a calculation has been done. "lblG" is the label needing the decimal limit.
this is my code if it is needed...
Private Sub cmdgo_Click()
'Make Variables
Dim A As Integer
Dim B As Integer
Dim C As Integer
Dim D As String
'Link Variables to form
A = txtA.Value
B = txtB.Value
C = txtC.Value
D = txtD.Value
'Arithmatic
lblA.Caption = "£" & (A * 0.45)
lblB.Caption = "£" & (B * 0.45)
lblC.Caption = "£" & (C * 0.45)
lblD.Caption = (A + B + C)
lblE.Caption = "£" & (A * 0.45) + (B * 0.45) + (C * 0.45)
lblF.Caption = "£" & (A * 0.45) + (B * 0.45) + (C * 0.45) + D
lblG.Caption = lblF.Caption / 0.45
End Sub
Thanks for any help...
this is my code if it is needed...
Private Sub cmdgo_Click()
'Make Variables
Dim A As Integer
Dim B As Integer
Dim C As Integer
Dim D As String
'Link Variables to form
A = txtA.Value
B = txtB.Value
C = txtC.Value
D = txtD.Value
'Arithmatic
lblA.Caption = "£" & (A * 0.45)
lblB.Caption = "£" & (B * 0.45)
lblC.Caption = "£" & (C * 0.45)
lblD.Caption = (A + B + C)
lblE.Caption = "£" & (A * 0.45) + (B * 0.45) + (C * 0.45)
lblF.Caption = "£" & (A * 0.45) + (B * 0.45) + (C * 0.45) + D
lblG.Caption = lblF.Caption / 0.45
End Sub
Thanks for any help...