vb6 href 'invalid property assignment'

I localize a file to my drive then try to change the html to point to it and get "invalid property assignments". The file saves fine.  The error only happens when I try to change the href to point to it.

The href prop is not read-only.  Please help me stop feeling so damn stupid.  Thx
dim im As HTMLImg
    For Each im In tc.getElementsByTagName("img")
        f = "c:\temp\" + id + "-" + Trim(Str(i)) + ".jpg"
        If URLDownloadToFile(0&, img.href, f, BINDF_GETNEWESTVERSION, 0&) <> ERROR_SUCCESS Then Stop
        f = "file:///" + f
--->      im.href = f         <----
        i = i + 1

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

i checked and href property of HTMLImg is read-only.
jmkexpAuthor Commented:
Hmmm...??  I hit F2 in the ide and bring up the object browser and it is not listed read-only.  Many other props are.  Are you using a better source? (Obviously my results seem to agree more with your source.)
jmkexpAuthor Commented:
Changing the src prop doen't seem to effect the href prop.  But apparently this is what is used tor retrieve an image because the new file will load properly pointing to the new file after changing only src.  Full points to you still if you'll reveal the source (Luke).
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

changing src prop does change the href prop, i did a test like this:

oimage.src = "C:\Winnt\Zapotec.bmp"
Debug.Print oimage.href


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jmkexpAuthor Commented:
I appreciate your efforts.  Guess I pay too much attention to stuff in the ide (which didn't update href simultaneous with src).  Skpped over the siimple var print.  (Doh!)

I'm here ready to give points if you'll just come across with your source that has href as read-only.
actually that was listed on my object browser..
jmkexpAuthor Commented:
Sunuva...   I'm sending you the points.  But that's not what it looks like in my (i guess old) stand-alone vb6.  Don't have a clue why. Seems identical save no r-o attr.  It was the first thing I checked.  If you are using VisStu maybe things are better there.  Anyway, thanx for the work.
jmkexpAuthor Commented:
Confirmed the solution I found with partial additional info as to cause.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.