Open a file...run macro...close file...

E

Ernesto

hello all,

i've been working with beginning to intermediate Excel VBA...but i've
been given a new project...which requires pulling data from some MS
Project files and dumping them into Excel.

Here is my question: Using VBA (or another automated process), what
would be the best way to open MS Project files (amount may varey by
directory), run a macro, and then closing that MS Project file?

I have a macro which pulls the dates and other nessary data and dumps
into Excel, but now I'd like a way to open files in different
directories and run this macro and then save the Excel file with the
name of the Project file. Is that possible?

Any help would be appreciated...

thanks!
Ernesto Estrada
 
J

Jack Dahlgren

Ernesto,

Start in excel, open an instance of project like this:
http://zo-d.com/blog/archives/programming/how-to-open-ms-project-from-excel.html
and run any macros within the project like this:
http://zo-d.com/blog/archives/programming/working-with-modules-and-macros.html

You can use the dir function to return the contents of a selected directory
or use whatever other means you like to loop through the files. Sorry, I
don't have access to the excel VBA help right now or I'd see if there is a
more appropriate method.

-Jack Dahlgren
http://zo-d.com/blog
 
E

Ernesto

Jack,

thanks for the reply. I have not had the opportunity to try out the
methods explained in the websites you provided, but when time
permits...i will definitately try them out.

I'll keep you posted...

Thanks!
Ernesto
 

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