Website Upgrade Incoming - we're working on a new look (and speed!) standby while we deliver the project

Tips on using this forum..

(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?

(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.

A small macro question

1 reply [Last post]
assaf f
User offline. Last seen 10 years 37 weeks ago. Offline
Joined: 26 Dec 2007
Posts: 32
Groups: None
Hi,
I’ve written a macro that will automatically check one value of a cell and according to it will change a value of another cell.
I ran into a problem when I wanted to move between two files (a master gantt file). Is there a VBA function that enables MS-Project to be able to move from a cell in one file to a cell in another file? or maybe I can hyperlink two activities from two different files?

Thanks,
Assaf.

Replies

Hannes de Bruyne
User offline. Last seen 2 years 15 weeks ago. Offline
Joined: 25 Jul 2005
Posts: 154
Groups: None
Set ProjAppl = CreateObject("MSProject.Application")

Title = "Please Select Microsoft Project File"
fname = Application.GetOpenFilename("Microsoft Project Files (*.mpp), *.mpp", , Title)

ProjAppl.FileOpen fname, ReadOnly:=False, FormatID:="MSProject.MPP"
Set aProj = ProjAppl.ActiveProject

’now open a seccond project
Title = "Please Select Microsoft Project File"
fname = Application.GetOpenFilename("Microsoft Project Files (*.mpp), *.mpp", , Title)

ProjAppl.FileOpen fname, ReadOnly:=False, FormatID:="MSProject.MPP"


Set bProj = ProjAppl.ActiveProject

Now you habe aProj.xxx
and bProj.xxx