VBA Add data to current project file?

M

mba1976

In Project VBA

Application.FileNew is setup new Project file to add data.

If if I want to add data to current project file, which is already open what
method will I use?

Thanks,
mba1976
 
G

Guidho

Hi mba1976,

you can do this using:

Dim Proj as Project
Set Proj = ActiveProject

and then access and add tasks and resources using:

Proj.Tasks.Add
Proj.Resources.Add
etc.

Hope this helps,
Guidho
 
R

Rod Gill

Hi,

For all questions like this, the answer comes from recording a macro of you
manually adding Tasks and Resources. You will need to remove various select
statements, but the basics will all be there.

--

Rod Gill
Project MVP

NEW!! Project VBA Book, for details visit: 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