What's this error, Please help.

RBrown

Board Regular
Joined
Mar 7, 2004
Messages
52
I have been working on a project for several weeks that has two forms and a lot of code and all of a sudden I get the following error:

"Error Accessing File. Network connection may have been lost"

I can see my modules in the project explorer window but I can't open them.
Can anyone tell me if there is a fix for this error.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

lozzablake

Well-known Member
Joined
Dec 15, 2005
Messages
818
Do you get this error when you try to open the file or when you run the macro?
 

RBrown

Board Regular
Joined
Mar 7, 2004
Messages
52
I get the error when the workbook is opened, I assume this is because it's trying to load a form but can't access the code and I also get it if I try to view any of the codes thru the project explorer or if I try to manually run any of the macros.
 

lozzablake

Well-known Member
Joined
Dec 15, 2005
Messages
818
The code is stored with the workbook unless there is a specific call to code in another workbook.

As this happens when you open the workbook there must be an event macro for the workbook. On the project explorer, if you click on the ThisWorkbook icon do you see any code?
 

RBrown

Board Regular
Joined
Mar 7, 2004
Messages
52

ADVERTISEMENT

No... I get the same error when I try that just as I do when I try to view code for any worksheet, userform or module.
 

lozzablake

Well-known Member
Joined
Dec 15, 2005
Messages
818
Is there anything in the workbook at all or is it a blank workbook that gets opened?
 

RBrown

Board Regular
Joined
Mar 7, 2004
Messages
52

ADVERTISEMENT

There are three worksheets, one is a time card template(hidden), one is used to store listbox values (hidden) and the other is a blank that is displayed when the workbook is first opened.

I would gladly e-mail it to you if you like.
 

lozzablake

Well-known Member
Joined
Dec 15, 2005
Messages
818
Sorry what I meant was are these worksheets blank or are they as you expect?

On the whole with this type of error I would expect you to be unable to open the file at all. Or there to be code trying to access another file. The fact that the modules cannot be accessed seems to indicate that perhaps there is some corruption somewhere.

Have you tried doing a File Save As and then tying to re-open the new file? Also you could try simply copying the file and then trying to open the duplicate version
 

RBrown

Board Regular
Joined
Mar 7, 2004
Messages
52
Yes the worksheets are as they should be and I have tried a Save As and tried a copied version as well as e-mailing it to another user to try. Nothing seems to work.
I looked on Microsofts web site for this error and found it but only as a Power Point Visual Basics error, no mention of it in Excel.
 

lozzablake

Well-known Member
Joined
Dec 15, 2005
Messages
818
Well I am sorry I am stumped. It may just be a file corruption. Do you have a back-up?
 

Forum statistics

Threads
1,137,366
Messages
5,681,072
Members
419,950
Latest member
BeckiJae

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top