473,324 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Unzipping File Error

twinnyfo
3,653 Expert Mod 2GB
Friends,

This is a conundrum I have been unable to solve. I have been using this code for years to unzip files:

Expand|Select|Wrap|Line Numbers
  1. Public Sub _
  2.     UnZIP( _
  3.         ZIPFile As String, _
  4.         DestPath As String)
  5. On Error GoTo EH
  6.     Const OverWrite As Long = &H10&
  7.     Dim shApp       As Shell
  8.  
  9.     Set shApp = New Shell
  10.     shApp.Namespace(CVar(DestPath)).CopyHere _
  11.         shApp.Namespace(CVar(ZIPFile)).Items, _
  12.         OverWrite
  13.     Set shApp = Nothing
  14.  
  15.     Exit Sub
  16. EH:
  17.     MsgBox Err.Number & vbCrLf & Err.Description
  18.     Exit Sub
  19. End Sub
I am using it in a new DB, and it simply refuses to work. I keep getting error 91: "Object variable or With block variable not set."

I KNOW there are some experts out there who might be able to figure this out. I have all references properly listed, all the folders and files exist, I just can't get the code to work properly. It has worked fine in other DB's without fail--same version, same PC, same everything.

There's got to be somethings easy....

Hepp me CactusData! You're my only hope!
Dec 4 '20 #1
9 4019
cactusdata
214 Expert 128KB
Sorry, can't catch the subtle detail, but check out (compare with) my UnZip function found at line 710 here: FileCompress.bas.
Dec 4 '20 #2
twinnyfo
3,653 Expert Mod 2GB
Unfortunately, I can't get there from here at work.

I've also seen your code elsewhere, and even with a direct copy and paste, I get the same error. It's completely bizarre.
Dec 4 '20 #3
twinnyfo
3,653 Expert Mod 2GB
OK Friends, chalk this one up as both a PICNIC error and a 1D-10T error combining to form one 7734 of a headache!

I had an extra backslash in my destination folder name, so it errored out on me! DUH!

PICNIC error: "Problem In Chair, Not In Computer"

Thanks for wasting your time on this anyway, I just spent two days chasing this down....
Dec 4 '20 #4
isladogs
455 Expert Mod 256MB
Sorry for my ignorance. 7734? Hell in reverse & inverted?
Dec 4 '20 #5
twinnyfo
3,653 Expert Mod 2GB
isladogs,

Yes - you've got it right!
Dec 7 '20 #6
isladogs
455 Expert Mod 256MB
Thanks. As I asked the question, I had a distant memory of that being something I did on the early calculators when I was a teenager...
Dec 7 '20 #7
twinnyfo
3,653 Expert Mod 2GB
Yeah, us old crusties still remember that stuff!
Dec 8 '20 #8
SwissProgrammer
220 128KB
I am new at C++ and I think that I would have done this by sub-classing the un-zip program and then telling it (via my C++ program) to unzip the file. That means that I would have had to (received the opportunity to) learn sub-classing in C++11.

Your process looks a lot easier.

Can what you have done in VBA be done in C or C++ up to C++11? If so, would someone please post that here?

Thank you.
Dec 14 '20 #9
twinnyfo
3,653 Expert Mod 2GB
Sorry, Swiss! I have not used C....
Dec 15 '20 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: piyushc | last post by:
Hi, I am having problem creating new project using VS.Net 2003. Whenever I am trying to create new project (any type) it shows error message "Error writing the project file. Error loading...
3
by: James Proctor | last post by:
Hi there, im brand new to ASP. Ive done loads of VB coding and one of my clients is intrested in a web based application, so im trying to play on and learn it a tad. However im comming across lots...
2
by: SoSaucily | last post by:
I am getting the 'partially uploaded file' error with uploads over about 4k-5k. $_FILE = 3. Rackin my brain on this one, any help appreciated. Php.ini - upload_max_filesize=2M -...
1
by: Nand Belani | last post by:
Hi, I have a MS Access 2000 database on the network, it is secured and the mdw file is on the network. The database works for most of the users on the network, but does not open for two of the...
0
by: El | last post by:
Users on the network with read-only access are recieving this error (Could Not Lock File Error 3050) when trying to open the database when another user is currently using the database. Any idea...
0
by: CjB | last post by:
Good Morning, I am trying to get PHP+Oracle to work on Solaris 8. I have installed Apache with the following: ./configure --enable-module=so When I start apache it works fine. I think build...
4
by: lawrence k | last post by:
I've a file that starts like this: <form id="pdsForm" method="post" action="/mcControlPanel.php" class="mcForm" charset="UTF-8" enctype="multipart/form-data" > and it contains this input: ...
0
by: amuven | last post by:
Hi All, I have created xls using pyExcelerator. when i tried to open that xls sheet i'm getting this error message "File error: data may have been lost " , Please some one help me how to rectify...
7
by: dlbuller | last post by:
Hi, I apologize if this question has been asked already. I have searched with no luck. I am trying to output a specifically formatted text file and then change the extension to another program...
1
by: sakthibalan | last post by:
In c++ iam getting unable to get obj file error first time i compiled i got the output but durinh the 2nd time i got this error plz help fixing up this
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.