Hi,
You might find this usful.
The first part (down to the double line) is
the contents of the .frm file for this procedure.
HTH
Rowland
Version 5#
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3192
ClientLeft = 60
ClientTop = 348
ClientWidth = 4680
LinkTopic...
Hi
JohnYingling's code does exactly what you asked for: remove everything
*after* the space, however this leaves the space at the end of your string.
If you want to take that out as well, then modify the code as such:
text1.Text = Left$(tetx1.text,lngInstr - 1)
HTH
Rowland
Hi,
Maybe you can adapt this to your needs.
There must be a more elegant way, but I
couldn't find one.
Place two text boxes and a button on the form
to try it.
Copy and paste this code into your code module.
HTH
Rowland
Private Sub Command1_Click()
Dim IntPart As Integer
Dim DecPart As Double...
VbAche:
I think this code will get you started.
On your form, place an array of three Option buttons and set their Index
to 1 thru 3 (default would be 0-2). Leave the default name. Change the Caption
property to: Index(1) = Pick 4, Index(2) = Fantasy 5 and Index(3) = Lotto 6.
Place three command...
Another approach:
Private Sub Text1_Change(Index As Integer)
Static LastWord As String
LastWord = LastWord & Right$(Text1(Index), 1)
If Right$(LastWord, 1) = " " Then LastWord = ""
If Len(Text1(Index).Text) > 30 Then
Text1(Index).Text =...
kylep,
You may want to try this, it is a notepad you can build into your project.
http://visualbasic.about.com/compute/visualbasic/library/weekly/aa052599.htm
HTH
Rowland
You have 2 "If" statements and 7 "End If" statements. Each "If" must have one and only one "End If". You cannot exit an "If - End If" the same way as a "Do - Loop" or a "For - Next", by using Exit Do or Exit For.
Perhaps a...
I hope I'm not out of line the way I am posting this reply, I'm new to this forum.
This was a very interesting problem, and as I too am in the learning process with VB it took some time for me to come up with a response.
Anyway for what it may be worth, here goes:
Below is an image of the form...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.