Path/File access error (Error 75)

P

Pykl

I have a workbook with a VBA project I created with Excel 97 and Win NT. We
recently upgraded to Win XP and Office 2003. The workbook is a template and
when it is opened the user is prompted to save it as a different filename and
then it is unprotected and a user form is opened to allow editing of values.

The macro runs fine the first time and lets me save as a new file and
continue editing as long as I wish just as inteneded. However after closing
the file if I then try to reopen the file for editing I get Path/File access
error (Error 75). Excel then generates an error forcing itself to close and
reopens using the autorecover feature. When the file is recovered all VBA
Projects have been deleted from the file disabling it's futher editing or use.

The initial code is as follows with the error being generated on the
fmPlateDesign.Show line.

Private Sub Workbook_Open()
If ActiveWorkbook.Name = "Plate Design.xls" Then
Do
fName = Application.GetSaveAsFilename
If fName = False Then ActiveWorkbook.Close
Loop Until fName <> False
Workbooks("Plate Design.xls").SaveAs FileName:=fName
End If

fmPlateDesign.Show

End Sub

Any help is appreciated since I don't know what else to try.
 
T

Tom Ogilvy

go into tools=>Options=>Transition tab and make sure the first dropdown shows

Microsoft Excel Workbook and not some older version.

also change

Workbooks("Plate Design.xls").SaveAs FileName:=fName
to
Workbooks("Plate Design.xls").SaveAs _
FileName:=fName, FileFormat:=xlWorkbookNormal
 
P

Pykl

Ok I tried that and it got rid of the Excel error 75 however now when I open
the workbook it doesn't give me an error message just opens the windows send
error report and crashes excel. The autorecover strips all the code from the
vba project. The auto recover info is this if it means anything to anybody:

AppName: excel.exe AppVer: 11.0.8012.0 AppStamp:43e2ab74
ModName: vbe6.dll ModVer: 6.4.99.72 ModStamp:40b29ba6
fDebug: 0 Offset: 000af7bd
 
T

Tom Ogilvy

First, I would check the references in the VBE and make sure I didn't have
any unusual references. If they are all OK, then

If it were me, and I had this problem, I would export all my modules/code
and import them into a new workbook created in xl2003 (or create the modules
and then copy and paste the coce). then copy the data and formulas.
Essentially rebuild the workbook in xl2003.
 
P

Pykl

This may be something to do with two command buttons on the worksheet. They
were created from the forms toolbar in excel 97. Have these been changed
somehow? I tried rebuilding them with ActiveX controls but got the same
error. When I looked at the macros the controls were referencing they were
looking to a previous version of the file (I've been saving them as Plate
Design2 etc to have the macros run.) I think these may be trying to look at a
previous file to find the code instead of running the code included with the
file.
 
P

Pykl

I made a new workbook, deleted the forms controls and made new activex
controls, pasted all the code in. I then disabled the entire workbook open
code which is shown below and the workbook opens fine and I can use the
controls as intended. So there is something in that workbook open routine
that is making excel crash. Any ideas about what this is and how to fix it
or, alternately, a different way to do the same thing, would be greatly
appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top