|
-
Sep 8th, 2000, 01:44 PM
#1
Thread Starter
Member
Hello.
I am making a program to help people with HTML. I.e. They fill out areas such as (combo boxes for background, text, link colors, etc. Text boxes for their email address, etc.)
What I needed to know how to do was the following:
1. Check to make sure all fields have been filled out, if not. alert the user with a MsgBox telling them which was missed.
2. If ALL fields are filled out the program may proceed and fill in the Text box with the HTML, using the supplied information, but have it so it will not go on without having them all filled in.
(during coding)
3. How (when using a Rich Text Box, to go to the next line down [as if you had hit the enter key]...rather than have to put a million spaces till it pushes the text to the line beneath the previous one.
Thanks in advance to anyone who can help me out a little 
(if it helps i have 1 textbox for email, 3 rich text boxes, 5 combo boxes for colors and a command button used to check all that and enable a rich text box to place the html codes there)
"..Follow the white rabbit.."
-
Sep 8th, 2000, 01:51 PM
#2
Fanatic Member
1.
[CODE]
If TExt1.Text = "" Or Text2.TExt = "" Or Combo1.Text = "" Then
MsgBox "Not all fields are fillled in", vbOkONLY, "Error"
Exit Sub
End If
[CODE]
2.
Code:
html.text = Text1.TExt & TExt2.TExt & Combo1.Text
3.
Code:
RichTextBox1.Text = RichTextBox1.Text & vbCrLf
'vbCrLF will start a new line
Hope that helps,
D!m
-
Sep 8th, 2000, 01:52 PM
#3
Frenzied Member
Answer to 1 & 2:
Code:
'Put the TxtBoxes in an array
Private Function CheckAllBoxes()
For x = 0 To NROFTEXTBOXES
If txtHTML(x).Text = "" Then
MsgBox "Please fill in all textboxes!!!"
Exit Function
End If
Next x
'Fill the HTML here!
End Function
Answer to 3
Code:
Rtf1.text = rtf1.text & VbCrLf
Hope it helped!
Hey DIM you beat me 
[Edited by Jop on 09-08-2000 at 02:56 PM]
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Sep 8th, 2000, 02:01 PM
#4
Thread Starter
Member
That works perfect! Thanx!
"..Follow the white rabbit.."
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
|