Skip to content

A small macro question

Assaf FMember for 18 years 9 months
Created
1
4
0
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.

1 reply

Oldest first
  1. 0
    Hannes de Bruyne ·
    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

Log in or join to reply

ProjectControls.com is free to join. Members can post questions, reply, vote and follow discussions.

Existing members: your original username and password still work. Forgot password?