ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Export to MS Project (https://www.excelbanter.com/excel-programming/311589-export-ms-project.html)

Cathy[_4_]

Export to MS Project
 
Hi,
I am trying to create VB code in excel that will

1. open a specific ms project file
2. select a range of excel data
3. update the ms project file
4. save and close the ms project file
5. return to excel

Thank you for any help you can provide

Cathy

Dick Kusleika[_3_]

Export to MS Project
 
Cathy

You'll have to be more specific about numbers 2 and 3. Here's how you do
numbers 1, 4, and 5.

Sub DoProject()

Dim prApp As MSProject.Application
Dim prProj As MSProject.Project

Set prApp = New MSProject.Application
prApp.FileOpen "\\Pm1\c\WINDOWS\Desktop\Job Schedules\MtCalvary.mpp"
Set prProj = prApp.ActiveProject

'Do numbers 2 and 3

prApp.FileSave
prApp.Quit

End Sub

Set a reference (VBE - Tools - References) to the MS Project Library.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Cathy" wrote in message
...
Hi,
I am trying to create VB code in excel that will

1. open a specific ms project file
2. select a range of excel data
3. update the ms project file
4. save and close the ms project file
5. return to excel

Thank you for any help you can provide

Cathy





All times are GMT +1. The time now is 11:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com