• Welcome to Valhalla Legends Archive.
 

Why doesnt this work?

Started by TeEhEiMaN, May 26, 2003, 05:48 PM

Previous topic - Next topic

TeEhEiMaN

I think im pretty close to gettin this but, can you tell me what to change, Fix.


Private Sub channels()
If Username = Form5.txtMaster.Text Then
If Left((LCase(Message)), 12) = (Form5.txtTrigger.Text & "addchannel ") Then
Dim chanuser As String
cmbchannellist.combo.AddItem = "chanuser"
End If
End If
End Sub



______

You didnt set chanuser


chanuser = Right(Message, (Len(Message) - 12))

put that right above your

cmbchannellist.combo.AddItem = "chanuser"

tA-Kane

#2
chanuser=Mid(Message,13)
cmbchannellist.combo.AddItem = chanuser
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

tA-Kane

Quote from: ______ on May 26, 2003, 06:12 PMYou didnt set chanuserchanuser = Right(Message, (Len(Message) - 12))put that right above yourcmbchannellist.combo.AddItem = "chanuser"
That code will still add "chanuser" instead of what's stored in chanuser.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

TeEhEiMaN

I dont think that cmbchannellist.combo is right, Its suppost to be like txtchannellist.text for a text Box, but what would it be for a combo box??? please respond fast

tA-Kane

Quote from: TeEhEiMaN on May 26, 2003, 06:43 PMwhat would it be for a combo box???
Try searching on google or Microsoft...
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Stealth

#6
http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=%22combo+box%22+%22visual+basic%22+adding+items

Google: The answer to the world's problems.

EDIT: Added url tags to link correctly.
- Stealth
Author of StealthBot

OcTaViuS

Quote from: TeEhEiMaN on May 26, 2003, 06:43 PM
I dont think that cmbchannellist.combo is right, Its suppost to be like txtchannellist.text for a text Box, but what would it be for a combo box??? please respond fast

ever think to try cmbchannellist.text?

TeEhEiMaN


TeEhEiMaN

omg this is weird!!!!!!

Why does this code not work?!


Private Sub channels()
If Username = Form5.txtMaster.Text Then
If Left((LCase(Message)), 12) = (Form5.txtTrigger.Text & "addchannel ") Then
Dim chanuser As String
chanuser = Right(Message, (Len(Message) - 12))
Combo1.AddItem = "chanuser"
End If
End If
End Sub

tA-Kane

In what way does it not work? In what way do you wish it to work? Stop being a <expletives removed>, and try to help us help you!
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Soul Taker

This won't fix whatever the problem is, but I'd use

chanuser = Mid(Message, 13)

instead of

chanuser = Right(Message, (Len(Message) - 12))

... Just because it's easier to figure out at a glance (I think).

OcTaViuS

Quote from: TeEhEiMaN on May 26, 2003, 07:59 PM


Combo1.AddItem = "chanuser"


dont use quotes around chanuser

______

Quote from: OcTaViuS on May 27, 2003, 10:39 AM
Quote from: TeEhEiMaN on May 26, 2003, 07:59 PM


Combo1.AddItem = "chanuser"


dont use quotes around chanuser

yes otherwise your just adding "chanuser" as text not a string