kazooie21
September 29th, 1999, 09:12 PM
I have the following code:
[vbcode]Private Sub cmdCalc_Click()
'calculate value of paperbacks
lblVpaper.Caption = Val(txtCpaper.Text) * Val(txtNpaper.Text)
'calculate value of hardcovers
lblVhard.Caption = Val(txtNhard.Text) * Val(txtChard.Text)
'calculate total value of paperbacks and hardcovers
lblTotv.Caption = Val(lblVpaper.Caption) + Val(lblVhard.Caption)
'calculate total
lblTot.Caption = Val(txtNpaper.Text) + Val(txtNhard.Text)
The problem occurs in the lblVpaper.Caption = Val(txtCpaper.Text) * Val(txtNpaper.Text)
I get a compile error: method or data number cannot be found
kazooie21
[vbcode]Private Sub cmdCalc_Click()
'calculate value of paperbacks
lblVpaper.Caption = Val(txtCpaper.Text) * Val(txtNpaper.Text)
'calculate value of hardcovers
lblVhard.Caption = Val(txtNhard.Text) * Val(txtChard.Text)
'calculate total value of paperbacks and hardcovers
lblTotv.Caption = Val(lblVpaper.Caption) + Val(lblVhard.Caption)
'calculate total
lblTot.Caption = Val(txtNpaper.Text) + Val(txtNhard.Text)
The problem occurs in the lblVpaper.Caption = Val(txtCpaper.Text) * Val(txtNpaper.Text)
I get a compile error: method or data number cannot be found
kazooie21