MS Project - Not Visable

Posted on 2007-10-17
Last Modified: 2013-11-15

When using VBA within MSProject, I've written the following code and it will open MSProject file but not make visable.  What am I doing wrong?


Private Sub ExecuteCompare()

Dim iProjectPrimary As MSProject.Project
Dim iProjectCompare As MSProject.Project
Dim strProjectPrimary as String
Dim strProjectCompare as STring

    strProjectPrimary = "\\HOUIC-S-01117\XXXXX\My Documents\X_Files\Planning\BPMA\Sub-teams\Project1.mpp"
    strProjectCompare = "\\HOUIC-S-01117\XXXXX\My Documents\X_Files\Planning\BPMA\Sub-teams\Project2.mpp"

    Set iProjectPrimary = GetObject(strProjectPrimary)
    Set iProjectCompare = GetObject(strProjectCompare)
    iProjectPrimary.Application.Visible = True

End Sub
Question by:eciabattari
    1 Comment
    LVL 21

    Accepted Solution

    there should be smth like iProjectPrimary.Application.Wimdow.State=<Maximized>

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
    Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now