From: Karl E. Peterson on
Webbiz wrote:
>>> This is in the Forms (General)
>>>
>>> Dim objFTP As Inet
>>>
>>>
>>> This is in the Forms_Load()
>>>
>>> Set objFTP = Me!axFTP.Object
>>>
>>> (the control is named axFTP)
>>>
>>>
>>> I get this error:
>>>
>>> Run-time error '13'.
>>>
>>> Type mismatch.
>>>
>>> This from a Microsoft MSDN page.
>>>
>>> Any idea why "Set objFTP = Me!axFTP.Object" causes this error?
>>
>> The object type being returned isn't the same as the variable you're
>> trying to assign it to.
>
> 1. Why then does Microsoft MSDN use this as an example if not correct?

Wow, does this *look* like a mountaintop I'm sitting on?

Hell, how would I know? They're probably the single *worst* example of
how to code in ClassicVB that there is. You asked what a "Type
Mismatch" error meant, and I told you.

> 2. Why are they not the same object type? The Inet control is simply
> named axFTP. The objFTP variable is declared as type Inet.

No idea. Never used that control.

> 3. Are you suggesting that the method ".Object" within the Inet
> control does not return an object of type Inet?

I just told you what the error means. Hopefully, someone who's used
that control would be more familiar with its object model. But yeah,
that's the gist of it, assuming that's the only issue in play.

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Nobody on
"Webbiz" <nospam(a)noway.com> wrote in message
news:rntvp5dv6sjlo05nn30jnrr74hph71br2g(a)4ax.com...
> I'm trying to write some vb code (to eventually become VBA code within
> Excel) that can copy a file from my client pc to my linux server and
> rename it (or, if not possible, to leave the name the same).
>
> After much searching on the net, this is what I've come up with so
> far.

Besides FTP, look up "HTTP Upload". Also, since you plan to use VBA with
this, I don't think you can redistribute INet control with it, besides, the
INet control is buggy. WinInet API is more reliable.


From: Webbiz on
On Tue, 16 Mar 2010 19:02:56 -0700, Karl E. Peterson <karl(a)exmvps.org>
wrote:

>Webbiz wrote:
>>>> This is in the Forms (General)
>>>>
>>>> Dim objFTP As Inet
>>>>
>>>>
>>>> This is in the Forms_Load()
>>>>
>>>> Set objFTP = Me!axFTP.Object
>>>>
>>>> (the control is named axFTP)
>>>>
>>>>
>>>> I get this error:
>>>>
>>>> Run-time error '13'.
>>>>
>>>> Type mismatch.
>>>>
>>>> This from a Microsoft MSDN page.
>>>>
>>>> Any idea why "Set objFTP = Me!axFTP.Object" causes this error?
>>>
>>> The object type being returned isn't the same as the variable you're
>>> trying to assign it to.
>>
>> 1. Why then does Microsoft MSDN use this as an example if not correct?
>
>Wow, does this *look* like a mountaintop I'm sitting on?
>
>Hell, how would I know? They're probably the single *worst* example of
>how to code in ClassicVB that there is. You asked what a "Type
>Mismatch" error meant, and I told you.
>
>> 2. Why are they not the same object type? The Inet control is simply
>> named axFTP. The objFTP variable is declared as type Inet.
>
>No idea. Never used that control.
>
>> 3. Are you suggesting that the method ".Object" within the Inet
>> control does not return an object of type Inet?
>
>I just told you what the error means. Hopefully, someone who's used
>that control would be more familiar with its object model. But yeah,
>that's the gist of it, assuming that's the only issue in play.


Sheesh Karl, what gives? First you start off being condensending with
that F8-9 comment, then you slap me silly and call me Lucy. And to
make it worse, you never used the control???

I know what the error is. Just like I know what F8 and F9 does. That
isn't what I asked. I know my English isn't the greatest, but
seriously? I was not the one who papered your house or egged your car,
so take it easy big guy, I bruise easily.

I'm asking WHY would I get an error that it is the wrong object type
being assigned a variable that is clearly declared as that object
type?

Webbiz
From: Webbiz on
On Tue, 16 Mar 2010 21:04:06 -0500, "Nobody" <nobody(a)nobody.com>
wrote:

>"Webbiz" <nospam(a)noway.com> wrote in message
>news:rntvp5dv6sjlo05nn30jnrr74hph71br2g(a)4ax.com...
>> I'm trying to write some vb code (to eventually become VBA code within
>> Excel) that can copy a file from my client pc to my linux server and
>> rename it (or, if not possible, to leave the name the same).
>>
>> After much searching on the net, this is what I've come up with so
>> far.
>
>Besides FTP, look up "HTTP Upload". Also, since you plan to use VBA with
>this, I don't think you can redistribute INet control with it, besides, the
>INet control is buggy. WinInet API is more reliable.
>

Okay, I'll look up "HTTP Upload". Don't know what the difference is
but will likely find out when I look it up.

Thanks.

Webbiz
From: Bob Butler on

"Karl E. Peterson" <karl(a)exmvps.org> wrote in message
news:%23EBYbYWxKHA.404(a)TK2MSFTNGP02.phx.gbl...
> Webbiz wrote:
>> Karl E. Peterson <karl(a)exmvps.org> wrote:
>>
>>> Webbiz wrote:
>>>> When I ran the above code, there was no indication that something had
>>>> indeed happened. So I know that somewhere here I need to be able to
>>>> return a status as to what has occurred or to say "It worked!" or
>>>> whatever.
>>>
>>> Are you aware of the F8/F9 keys, and how to use them?
>>
>> Yes Karl. That's not it. I stepped through the darn thing and get
>> nothing.
>
> Okay, didn't mean that to sound (too!) condescending. <g>
>
>> My question was more directed at what I could plug into the
>> code to make it tell me what the server was saying was happening.
>
> I'd be looking at the return value of each API call. Immediately. Right
> as/after they were made.

possibly along with Err.LastDllError