Call Us Today! 1-800-895-3254
[email protected]
Microsoft Training
Integent offers a comprehensive portfolio of training services, with an ideal fit for every organization. Ranging from general courses to custom solutions, we have you covered.
Learn About TrainingSee Full list of Courses
Microsoft Consulting
Integent provides consulting services for a variety of Microsoft applications including Microsoft Project, Project Online, Project for the Web, Dynamics 365, and Microsoft SharePoint.
Learn About Consulting
Microsoft Support
Microsoft technologies set the standard for project portfolio management, business applications, collaboration, and more. Integent has flexible solutions to support every customer.
Learn About Support
Microsoft Project
Integent has the knowledge and experience to help design and deploy a solution to help your organization manage projects and resources more effectively
Learn More About Microsoft Project
Microsoft Dynamics 365
Integent can help you nsure business continuity with a custom cloud solution that connects sales, service, finance, and operations teams to deliver results.
Learn More About Dynamics 365
Microsoft SharePoint
SharePoint is Microsoft’s collaboration platform that is a place where team members can communicate, exchange data, share files and much more.
Learn More About Microsoft SharePoint
Microsoft Power Platform
Consisting of Power BI, Power Apps, Power Automate and Power Virtual Agents, the Microsoft Power Platform helps streamline and improve business functions.
Learn More About The Power Platform
About Integent
Integent was founded in 2009 on the principles of building long-lasting relationships with customers, exceeding expectations, and providing outstanding customer service. 

We’re dedicated to providing a customized solution backed by our knowledgeable team of Microsoft experts.
Discover What Makes Us Different
GSA Schedule
Integent is GSA Schedule Contract holder. A GSA schedule helps simplify selling our services to government customers.
Read More Here
News
Stay informed on Integent’s latest company updates and other important industry information. Our passion is customer success.
Read The Latest News
Videos
Learning new software doesn’t have to be difficult with our library of dozens of free training videos. Our video training always has something new.
Browse Our Training Video Library
Blog
Our industry experts share best practices and common pitfalls to avoid, in order to get the most out of your technology solutions.
Discover More

April 4, 2013

Macro to export Resource non working time to Excel

I created a below macro while helping one of users in project forum to create a report which lists all resources and shows their 'unavailability' (i.e. working time exceptions)

1. Open the Project File

2. Press Alt + F 11

3. Right click on VBAProject(ProjectName) and select add Module

4. Copy the below code in the module

=======================

Sub ResourceExceptions()
Dim MyXL As Object
Set MyXL = CreateObject("Excel.Application")
MyXL.Workbooks.Add
MyXL.Visible = True
MyXL.ActiveWorkbook.worksheets.Add.Name = "Exception Report"
MyXL.ActiveWorkbook.worksheets("Exception Report").Activate
Set xlRange = MyXL.activesheet.Range("A1")
xlRange.Range("A1") = "Resource Name"
xlRange.Range("B1") = "Start Time"
xlRange.Range("C1") = "Finish Time"
i = 2
For Each R In ActiveProject.Resources
If Not (R Is Nothing) Then
ctr = 1
If R.Type = pjResourceTypeWork Then
If R.Calendar.Exceptions.Count > 0 Then
For Each E In R.Calendar.Exceptions
xlRange.Range("A" & i) = R.Name
xlRange.Range("b" & i) = R.Calendar.Exceptions.Item(ctr).Start
xlRange.Range("c" & i) = R.Calendar.Exceptions.Item(ctr).Finish
ctr = ctr + 1
i = i + 1
Next
End If
End If
End If
Next R
End Sub

===========

1. You can run this macro using view >> Macro >> view macro >> select ResourceExceptions and click run

2. To make this macro available for all project copy this macro in global.mpt. File >> Info >> Organizer >> Module >> Select "ResourceExceptions" from Project to global.mpt

© Copyright 2023 | Integent.com | All Rights Reserved
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram