Method 'FileOpen' of Object '_MSProject' failed

J

Joy

in our macros, we use the codes to import data from csv file:

On Error GoTo 0
FileOpen Name:="C:\Export.csv", FormatID:="MSProject.CSV", Merge:=2,
map:="User Map"

occasionally, when using MS 2007, I got the following error:

Run time error '-2147417848 (80010108)'
Method 'FileOpen' of Object '_MSProject' failed

then I have to close it and start it over again.

this does not happen each time, but sometimes..

is there any way to make sure it runs smoothly and does not cause such error?

thank you
 
R

Rod Gill

Firstly do you have SP1 installed (install SP2 when it comes out this week
as well)?

Does this happen to specific csv files or any of them?

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
J

Joy

Thank you for the reply.

The user uses MS Office Project Standard 2003 (11.3.2007.1529) SP3

Actually, I have the same issues with MS2007 occasionally.

The user told me he had the issue last week, and he did not install any
updates during the time.

the csv file for the user is large. I use the code to import data from csv
file, and it took about 1 min. does it cause the problem?
 
R

Rod Gill

Have you tried creating a new map that only imports some of the data? Have
you tried splitting the data into two files and importing both? I don't know
what is causing the problem so we need to try finding what it isn't.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
J

Joy

Yeah, we only import part of the data, not all columns
we do not split data into 2 files and importing both

only import 1 csv file to 1 project file, but import part of the fields.

thank you
 
R

Rod Gill

No, I need you to split the file so we can test if it's the size of the file
that is the problem or problem data in part of the file that's causing the
problem. You need to do a number of tests to narrow down what might or might
not be the problem.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 

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