Error code 2302 on individual machine

U226RM2

Registered User.
Local time
Today, 13:51
Joined
Oct 29, 2007
Messages
16
Hello all

I have a macro set up which exports items from a query into an excel spreadsheet so it can be emailed easily. One of my colleagues was able to do this on Monday, but since then she has been getting an error message 2302 and it won't export the data. (The macro works on her desktop but not on her laptop, BTW). I've changed the macro to try and export as text and PDF with no success from her laptop. Also, I can run the macro from my laptop.

Any help gratefully received.
 
show the code. we cant guess.
it could be the filename. you cant use drive letters if they are not setup on the PC.
ALWAYS use UNC paths.
 
I have a piece of string, but it is too short. How long should it be? :)
 
Thanks, the drive is mapped to the correct letter on the laptop (and it worked for her on Monday). No idea of the code but here is the first part of the macro in design view.

Capture.PNG
 
if the folder "Drive:\Microbiology\IC Daily ALERT LIST" is mapped To F:,
you just use:

F:\community list for sending3.xls
 
It isn't, everything before \Microbiology is mapped to F.
 
and where it is mapped?
you must re-create same folder path as with the mapped drive +\Microbiology\IC Daily ALERT LIST (folder).
 
and where it is mapped?
you must re-create same folder path as with the mapped drive +\Microbiology\IC Daily ALERT LIST (folder).
Thanks but I don't think this is the problem, it works on everyone else's machines and it worked for her on MOnday.
 
Is the file open somewhere?
Is an Excel instance running at all?
 
Error 2302 is "Can't save to the file you have specified." Therefore you have to consider
- bad file name
- bad path
- incorrect permissions
- missing reference to Excel (because the "Export" function uses the Excel library).

Since it works on the desktop but not the laptop, that eliminates the name and path issues. The ability to save outside of the context of Access eliminates the permissions issues. That makes me think the laptop doesn't have proper references set up. And unlike permissions and naming issues, references are specific to individual machine since they are at least partly a registry function from the HKLM (EDIT: or the HKCU) hive.

Therefore, open up the app on the laptop and somehow get to the VBA coding page so you can follow Tools>>References to assure that the references checked there match the ones checked on the desktop.
 
Last edited:
We had an issue the other day where Access could not delete or overwrite a readonly file. (I mean reported on this forum)
It turns out that it just cant; do this.

It was a low error number though. Error 75 - I just looked it up
 

Users who are viewing this thread

Back
Top Bottom