Solved

Method "~" of object "~" failed

Posted on 2002-04-23
12
187 Views
Last Modified: 2013-11-26
I have a DLL which is using "vbzip10.dll" for zipping of the files. In some of the cases if I use wildcharacters more than once it either gives a memory reference error or "Method "~" of object "~" failed".

If the file is corrupt then also it gives the same error.
I need to sort this problem urgently.

Thanx in advance.

Regards

Sudhir
0
Comment
Question by:SudhirChawla
12 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6963629
It is difficult to say what is the cause, without seeing any code, but one thing you can do is add error handling and handle the error there.

Anthony
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6963920
We recently got that and it turned out to be a system that needed MDAC installed.  I don't know if it shows up for other things, too.
0
 

Author Comment

by:SudhirChawla
ID: 6964651
Hi,

I have also installed a proper version of MDAC but still it is giving the problem..

I will paste the code soon..
Thanx
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:SudhirChawla
ID: 6964662
I am using CZIP DLL Name vbZIP10.dll

This is the code

                On Error GoTo errZipHandle
               
                Do While Not fobj_rsbranch.EOF
                    With mobj_cz
                       .ZipFile = pstr_destinationfolder1 & "\" & pstr_destfilename1
                       .StoreFolderNames = False
                       .RecurseSubDirs = False
                       .ClearFileSpecs
                       For lint_ctr = 0 To UBound(str_filenamearr())
                                .AddFileSpec pstr_SourceFolder & "\" & str_filenamearr(lint_ctr)
                       Next
                       .Zip
                    End With
                    fobj_rsbranch.MoveNext
                Loop



Please help.....

Thanx
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6966081
And at what line is the error occurring?

I'm guessing that there is a missing dependency file which is causing that error to occur (I think that's why we got it for MDAC.)

Run a dependency walker on the czip.dll and hopefully it will tell you what it needs to operate.

0
 

Author Comment

by:SudhirChawla
ID: 6967727
it gives an error on ".ZIP".
I have installed MDAC on all the machines.
But still this problem is not resolved.


0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6969180
So the problem is occurring on

mobj_cz.ZipFile =...

What's the definition for mobj_cz.  Something like this?:

Private mobj_cz as ZipObject

I think you should check the vbZIP10.dll documentation and see if it has any information about installation issues.
0
 

Author Comment

by:SudhirChawla
ID: 6970469
There is no documentation with me currently.

The def. is
public withevents mobj_cz as zipObject

It is not giving problem in most of the cases where I am using it.

If the def. would have been wrong then it would have started to give problem earlier also.

0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6971759
Unfortunately, since I'm not familiar with that dll, I don't know what it supports, and there could be some intermittent problems with it.

Since there are other zip/unzip components, I'd suggest looking into some of them and try replacing the dll.  It may be a bit of work, but should be worth it in the end since you don't have any documents explaining how to deal with problems.
0
 

Author Comment

by:SudhirChawla
ID: 6976308
Thanx for helping me
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7660718
Hi SudhirChawla,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

SudhirChawla, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7755391
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to skip loop 6 64
VB6 ListBox Question 4 48
checkbox to hide entire section 10 41
adding "ungroup sheets" to existing vbs code 5 30
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question