Okay, I went in to insert the typename call, and then, with fresh
eyes, I saw what the REAL mistake was. Had nothing to do with 'd'
Sub web_endtransfer(d)
If d = 1 Then
txtMsg = headers & body
End If
End Sub
txtMsg is a textbox object. I was using vb6 shortcuts, and changing
the line to:
txtMsg.Text = headers & body
makes it run much happier! Thanks for the attempt to sort out my
mistakes.
--- In [EMAIL PROTECTED], "George Henne" <[EMAIL PROTECTED]> wrote:
>
> The TypeName() function can be useful to see the type of the
variable
> being returned. Can you use it to confirm that d is what you think
it is?
>
> >Hey, hoping that somebody might be able to help me. I'm giving
> >IPworks a try, and started with converting a simple HTTP program I
> >already had working with newobjects.
> >
> >If the internet is available, I get to the following message:
> >Scripting Error [ok]
> >Microsoft VBScript runtime
> >error - line 31, char 6
> >Object doesn't support
> >this property or method
> >
> >Line 31 appears to be "if d = 1 then", which doesn't seem to have
an
> >object, unless the d variable (passed by the web_endtransfer
event)
> >is a complex object and not an integer. However, I've commented
out
> >that line and the 'end if' and still gotten the same message, so
line
> >numbers are probably off.
> >
> >Full code follows. Any ideas?
> >
> >==========
> >
> >Option Explicit
> >ShowOKButton True 'for CE
> >
> >Dim ConnectCount
> >AddObject "IPWorks.HTTP", "web"
> >
> >Dim headers, body
> >
> >Sub cmdFetch_Click
> > web.get "http://vb.training.dependableit.com/log.txt"
> > headers = ""
> > body = ""
> >End Sub
> >
> >Sub web_header (f, v)
> > If f = "" Then
> > headers = headers & "\--> " & v & vbCrLf
> > Else
> > headers = headers & f & ": " & v & vbCrLf
> > End If
> >
> >End Sub
> >
> >Sub web_transfer (d, bt, t)
> > If d = 1 Then
> > body = body & t
> > End If
> >End Sub
> >
> >Sub web_endtransfer(d)
> > If d = 1 Then
> > txtMsg = headers & body
> > End If
> >
> >
> >End Sub
> >
> >
> >
> >
> >
> >------------------------------------
> >
> >Yahoo! Groups Links
> >
> >
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nsb-ce" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/nsb-ce?hl=en
-~----------~----~----~----~------~----~------~--~---