|
-
September 28th, 1999, 06:19 PM
#1
compile error: method or data member not found
I have the following code:
[vbcode]Private Sub cmdCalc_Click()
'calculate value of paperbacks
lblVp.Caption = Val(txtCpaper.Text)* Val(txtNpaper.Text)
[vbcode]
I run it and get the following message:
compile error: method or data member not found
-
September 28th, 1999, 08:16 PM
#2
Re: compile error: method or data member not found
Make sure that you still have a button named cmdCalc, a label named lblVp and two text boxes named txtCpaper and txtNpaper. Also check your spelling.
It may sound stupid, but it's easy to make this mistake...
That error message is telling you that you don't have an object by one of those names or one of those objects don't have a method that you are trying to use...
-
September 29th, 1999, 03:42 AM
#3
Re: compile error: method or data member not found
Use Str for better Format fns to format the value into a string before assigning to Caption.
lblVp.Caption = Format(Val(txtCpaper.Text)* Val(txtNpaper.Text),"####.##")
RK
-
September 29th, 1999, 03:48 AM
#4
Re: compile error: method or data member not found
Try to change the last row in your code to this one:
lblVp.Caption = cstr(Val(txtCpaper.Text)* Val(txtNpaper.Text))
Did it work???
Michael Vlastos
Automation Engineer
Company Modus SA
Development Department
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|