FAQ Database Discussion Community


VBA excel Assigning resources to a task in MS Project

excel-vba,ms-project
I am trying to build a simple schedule from an excel 'database' with MS Project. I am running into multiple runtime errors, but I dont care so much about that, I just would like to understand how to assign a resource that I have pulled into a variable to a...

Global variable losing it's value after Project is closed

excel,vba,excel-vba,project,ms-project
I have a collection as a global variable, that would have Project Task objects in them. The structure of my macro would be the following: Public TaskCollection As Collection Sub Main() Set TaskCollection = New Collection GetData(List of project paths) For Each task in TaskCollection //ProcessTask() Next End Sub Function...

Slow VBA macro writing in cells

excel,vba,excel-vba,ms-project
I have a VBA macro, that writes in data into a cleared out worksheet, but it's really slow! I'm instantiating Excel from a Project Professional. Set xlApp = New Excel.Application xlApp.ScreenUpdating = False Dim NewBook As Excel.WorkBook Dim ws As Excel.Worksheet Set NewBook = xlApp.Workbooks.Add() With NewBook .Title = "SomeData"...

DateDifference in C#

c#,vsto,ms-project
Using VBA for MS Project, one of the command is DateDifference. differencedate = Application.DateDifference(tsk.BaselineStart, tsk.BaselineFinish, ActiveProject.Calendar) However, I am trying to use VSTO for MS Project, but I can figure out how to use DateDifference. Is there an equivalent command cor C#?...

Microsoft Project releationship VBA code

vba,tfs,ms-project,microsoft-project-vba
I am doing a working semester right now, with the course of study bachelor of business computing. I am not an expert in coding (think got some OK basics) nor I am a 100% fluent in English as my 2nd language so be a bit gentle on mistakes or "bumpy"...

Iterate through Resource Graph view and export to XPS with resources name in VBA Microsoft Project 2010

vba,ms-office,ms-project,microsoft-project-vba
I am trying to iterate through the Resource Graph view one resource at a time and export to XPS with the appropriate name associated with the file. Here is the code: Sub ResourcGraph() ' Macro Macro4 ' Macro Recorded Tue 6/9/15 by Valencia, Jonathan. Dim Res As Resource ViewApply "Resource...