|
-
May 29th, 2000, 11:25 PM
#1
Thread Starter
Lively Member
Hi,
I'm changing some code a friend wrote for me. Unfortunately she's gone to Spain. She wrote the code with a picture box in mind, but I'm changing it to a textbox - makes more sense.
In a command button I have:
Command1_Click()
Text1 = "We are being asked to find the value of 'x'." & _
"Firstly, we have to tidy up the left side of the equation,"
qShow
End sub
This then calls the function, qShow
It works fine for the code as a Picturebox:
Sub qShow()
If b < 0 Then Pictext.Print Trim$(a); "(x" & Trim$(b) & ")" _ Else: Pictext.Print Trim$(a); "(x+"; Trim$(b); ")"
End Sub
But if I change Pictext.Print to Text1.Text, I get the following error:
Compile Error: Expected: End of Statement, and ";" is highlighted. Could someone please tell me how to sort this out?
Thanks a lot!
-
May 29th, 2000, 11:28 PM
#2
_______
not sure if I get what you are after
but you should change pictext.print to text1.print
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
May 30th, 2000, 12:04 AM
#3
With all due respect, Joe, the textbox does not have a Print method, so you can't say Text1.Print ...
Chris, what you want to do is convert the semicolons to ampersands so that you can display a concatenated string. (In the Print method, the semicolon means "print the following item adjacent to the previous item". To achieve the same results with a textbox, you must concatenate.)
Try this:
Sub qShow()
If b < 0 Then
Text1.Text = Trim$(a) & "(x" & Trim$(b) & ")"
Else
Text1.Text = Trim$(a) & "(x+" & Trim$(b) & ")"
End If
End Sub
[Edited by BruceG on 05-30-2000 at 01:05 PM]
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
|