G
Guus van Waardenburg
Good day,
I have two Userforms.
You can see the first one as the parentform so to speak and the second one
as the subform.
Now what I want to do when I'm finished with te subform is: sum up a digit
in the subform with a digit on the parentform and then replace the last digit
with the outcome. But when I try this with a simple 'formula' like:
Dim i As Double
i = frmParent.lblTotal.Caption + lblPremium.Caption
frmParent.lblTotal.Caption = i
VBA treats my outcome as a string. This means that when the caption was 100
and de new outcome would be 10 then it doesn't say 110 but 10010!!!
Now I know I have to use something like i = CDbl(frmParent.lblTotal.Caption
+ etc.
But I cant get it to work, can somebody help???
I have two Userforms.
You can see the first one as the parentform so to speak and the second one
as the subform.
Now what I want to do when I'm finished with te subform is: sum up a digit
in the subform with a digit on the parentform and then replace the last digit
with the outcome. But when I try this with a simple 'formula' like:
Dim i As Double
i = frmParent.lblTotal.Caption + lblPremium.Caption
frmParent.lblTotal.Caption = i
VBA treats my outcome as a string. This means that when the caption was 100
and de new outcome would be 10 then it doesn't say 110 but 10010!!!
Now I know I have to use something like i = CDbl(frmParent.lblTotal.Caption
+ etc.
But I cant get it to work, can somebody help???