...

View Full Version : VB6 Novice



Mitch
02-19-2004, 05:34 PM
Hey people...

I just started vb6 a couple of months ago...im still basically a noob..and i need someone to sort of lead me in the right direction. I am having tremendous trouble with If then expressions, and im trying to figure out exactly how to use a module function ( enabling the application to leave information that has been put into it after the application is started )


Please instant message me on aim : W0TH

Roy Sinclair
02-19-2004, 06:25 PM
Please instant message me on aim : W0TH

If you don't get any help that way (which is likely) then try posting the troublesome code here and work through the forum.

Mitch
02-19-2004, 08:17 PM
ok...ill do that right now



Private sub tocsocket_incomminginstantmessage (struser as string, strmessage as string, answer is boolean_

If strmessage = "/away" then
form1.tocsocket1.sendinstantmessage text1, "aim:goaway"
endif
end sub


I dont see ANYTHING wrong with that code....ive asked alot of programmers for help, and they dont know either....

Roy Sinclair
02-19-2004, 08:44 PM
Well I can see things wrong:



Private sub tocsocket_incomminginstantmessage (struser as string, strmessage as string, answer is boolean_

If strmessage = "/away" then
form1.tocsocket1.sendinstantmessage text1, "aim:goaway"
endif
end sub


The declaration is incorrect, "answer as boolean" and the trailing _ plus the missing ) to close the declaration makes that all wrong.

The fact that you're only using "strmessage" within the sub yet require three parameters strikes me as rather strange too. There's nothing wrong with the if statement itself but unless you fix the problems ahead of it, it'll never run.

Does this help?

Oh yeah. I don't have IM of any brand available so all help from me will have to be done right here.

Mitch
02-19-2004, 09:25 PM
Yeah i know...i didnt look up the code before i posted it, i just wrote it, because ive basically memorized it bc i've used it so much...anyways....yeah i know its answer as boolean and the _ was a typo.

I dont understand what your sayinf....can u post the code the way you'd use it?



Oh yeah...and what exactly is boolean...ive been using it alot...i always write false?

Roy Sinclair
02-19-2004, 10:20 PM
Cut and paste the code that's getting the error into the message, otherwise there's no way I can be sure you're even close.

It would also help to know exactly which line of the code is the one with the error and the text of the error message wouldn't hurt either.

Mitch
02-19-2004, 10:39 PM
Private Sub tocSocket1_IncomingInstantMessage(strScreenName As String, strMessage As String, blnAutoResponse As Boolean)
If strMessage = ".away" Then
Form1.tocSocket1.SendInstantMessage Text1, "aim:goaway:"
End If




stupid thing



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum