I'm experimenting with check boxes, and so far I have bold, italic etc. etc. But I want to make it, so when you click one of these check boxes is, it will fill words such as "****" with "#&@&" but, I gave up on the idea to fill it with "#&@&" because I couldn't figure it out, so then I tried just deleting the work from the final showing. But now, I can't seem to get that to work, so anywayz, here's my code so far.
Private Sub chkL_Click()
If chkL.Value = vbChecked Then
If LblUser.Caption = "****" Then
LblUser.Caption = -"****" = True
Else
LblUser.Caption = -"****" = False
End If
End If
End Sub
If there is a way to fill in the word with simbols, please let me know!!
Last edited by shishkabob; Feb 22nd, 2004 at 08:10 PM.
I'm a noobie when it comes to programming, please teach me, so I can also have the advantages of making my own programs, and money.
First of all you should be getting errors with your code.
VB Code:
If chkL.Value = vbChecked Then
If LblUser.Caption = "****" Then
'LblUser.Caption is a Caption it can't = True only Enabled or Visible
'and you can't have (-)
LblUser.Caption = -"****" = True
LblUser.Caption = "****"
Else
LblUser.Caption = -"****" = False
If you want specific characters in the caption then specify them "%$&@#" or use Chr$(Number). You will have to lookup the Numbers for the characters you want.
If chkL.Value = vbChecked Then ' If check box is clicked, then make the caption the same, without the word "f.u.c.k."
LblUser.Caption = Replace(LblUser.Caption, "****", "&*%$") ' This is where the replacing begins, the **** is F.U.C.K.
Else
LblUser.Caption = (txtUser.Text)
End If
Kinda hard to explain, but here's my file... you will notice that you can check all the boxes before hand, then enter the text, then press the button, and the txt will show up in the lbl with the corrosponding attributes, but the language filter you have to wait intill txt is in the label.
Example.. I put in (f.u.c.k) without the .'s but I don't click the User button yet, I check all the chk.. boxes then press the user button. All attributes are correct (text is bold, italec, etc) But, it dosn't censor the cuss word intil after you unclick the lang. chk box, and then reclick it, (why is this?)
Last edited by shishkabob; Feb 22nd, 2004 at 06:15 PM.
I'm a noobie when it comes to programming, please teach me, so I can also have the advantages of making my own programs, and money.
That's hard to say without seeing the code, but apparently when you click the command button you don't check the value of the checkbox. You have to do that; so just insert this code in the Command_Click sub (I suppose it's not there yet...).
VB Code:
If chkL.Value = vbChecked Then ' If check box is clicked, then make the caption the same, without the word "f.u.c.k."
LblUser.Caption = Replace(LblUser.Caption, "****", "&*%$") ' This is where the replacing begins, the **** is F.U.C.K.
Still a no go...... it dosn't change the text, when cmd button is clicked. Can't figure it out, would I have to use a for... do loop??? ex.. for every **** in lblUser.caption ????
I'm a noobie when it comes to programming, please teach me, so I can also have the advantages of making my own programs, and money.
look at this line
LblUser.Caption = Replace(LblUser.Caption, "****", "&*%$")
I don't think you even looked at the code. If you can't find the problem then I don't know what to say. Look at even the comment AFTER the line (in your own code, not this line I copied out of it). It tells you what **** is suppose to be (since the forums filter swears).
Remember, if someone's post was not helpful, you can always rate their post negatively .