Suppress message box in macro

P

Pete Hay

I'm using the code from a recorded macro as a starting point to automating
the creation of Project 2007 files from a few hundred .xls files.

When I run my macro I get the "You are trying to open a file saved in an
older format...) message and have to click OK. Can I suppress this message
box?
(Am I correct that Project 2007 still cannot open/import .xlsx files?)

BTW- My idea is to use VBA in Project 2007 to create a DAO recordset of each
of the excel filenames (with path) and loop through those as a "fileName"
variable in the macro code.
Anyone see any gotcha's in my thinking here?
Pete
 
J

JulieS

Hi Pete,

I suggest setting the option on the Security tab in Tools > Options to
"Allow loading of legacy files" not "Prompt when loading."

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional
information about Microsoft Project
 
J

Jack Dahlgren MVP

Julie provided the answer to the first part.
I don't see an issue with the second part.
I might add an excel file which you can read all the filenames from - and
post a log to as you go through them.

-Jack
 
R

Rod Gill

Also, the Displayalerts=false command will stop the message prompts. Be sure
to use DisplayAlerts=True at the end of your macro.

--

Rod Gill
Microsoft MVP for Project - http://www.project-systems.co.nz

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




Jack Dahlgren MVP said:
Julie provided the answer to the first part.
I don't see an issue with the second part.
I might add an excel file which you can read all the filenames from - and
post a log to as you go through them.

-Jack




__________ Information from ESET Smart Security, version of virus
signature database 4836 (20100204) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 4836 (20100204) __________

The message was checked by ESET Smart Security.

http://www.eset.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