Get Excel To Open MS Project File And Then Run Project Macro On It
Jul 30, 2013
I am trying to get excel to open a MS Project file and then run a project macro on it.
What is happen is that when I run my code it works, and then excels VBA window freezes up and the run arrow goes away, and if I try to open project I just get a chiming noise and it won't open.
For now I have to select the MS Project file from a directory, but in the future I would like it to go through the folder and open all of the file in the folder
Dim mpApp As MSProject.Application
Dim prjmacro As Object
'Identify the File to Open - START
FileToOpen = Application.GetOpenFilename("Microsoft Project Files (*.mpp), *.mpp")
If FileToOpen = False Then
'Identify the File to Open - END
My task is to consolidate 4 Excel Project Lists (Workbooks) to a Master Workbook. The Project Lists has a different structure and almost different content. The relevant information is always on Sheet1 but it has completely different ranges. The only constant is the Project Number, which should be used to sort the information. Every Project should be listed only once with all the existing information.
I found a code written by Ron de Bruin which has already some components that I want to have in my VBA but I think there are still a lot of necessary adjustments to do.
Code: Sub MergeSelectedWorkbooks() Dim SummarySheet As Worksheet Dim FolderPath As String Dim SelectedFiles() As Variant Dim NRow As Long Dim FileName As String Dim NFile As Long Dim WorkBk As Workbook
The Master Project List should has the headers in Row1 and the information listed below. The Macro should automatically places the correct information to the correct column. Some of the information are in 2 or more of the lists but they should be listed only once in the Master List.
Project Description ... 1111E.000000001
I guess a problem is that the structures of the Lists are quite different so there must be a kind of sorting process.
In the end I want to have an Excel File with the Macro and a Command Button and by clicking the Macro creates a new Workbook with the Master List.
It would be better if there is a variable range instead of a defined. Like the Macro searches the last row and starts at this row and column.
I have discovered that I can write a macro in Microsoft project that opens Excel
but this call does not allow me to specify a file to open, it just opens an instance of Excel (or activates the open instance). What I ultimately want to do it to, from a Project macro, open a particular workbook and then execute a macro in that workbook.
I have a table of projects with 1) duration in year, 2) time window (number of years of our planning cycle), and 3) start year of the project. I want to generate a list of project parts of all projects where they may take place. This will serve as an input to an optimization program.
So a project of 2-year duration should have 2 parts over any year within the time window. I am including the "impossible" ones for my developer to tag them as "0" when we run it through his code.
I need to write a couple of functions. Firstly I want to do a count on column B (project $) depending on the criteria on column A (project description). For example a total count of all values in col B if project description is "P" or "A". [I can do sumif functions but this is a countif and I cannot get this right].
I'm a noob to programming in XL, and am teaching myself through a project for manipulating vectors. One thing that has me stumped is that when I open the file in which I'm working, I get a "This action will reset your project..." message.
I have an Excel File and I have created some code. I locked the VBA Project where that code is contained..... However when I work with the excel executing the mentioned code and after that I try to save it with the information resulting, Excel shows me the following message: "YOU CAN NOT SAVE TO THIS FILE FORMAT WHEN THE VBA PROJECT IS PROTECTED. YOU MAY UNPROTECT THE VBA PROJECT BY CHOOSING THE PROPERTIES COMMAND ON THE VISUAL BASIC EDITOR’S TOOLS MENU, AND ENTERING THE PASSOWORD FOR THE ACTIVE PROJECT....."...
If i have a table full on excel data, date, names etc, and I have a userform where someone has filled all that in. On that particular userform I was wondering if their's a way I can get it to write each column over to a sample MS project document.
To save me having to manually change it over?
so on clicking a button, what ever's in sheet1 say it writes out out to specific ms project strips, e.g. start date(excel) written out to data(project)
Uses excel 2010 to track the project in the form of project status report. Basically it has to look simple yet tracking should be in the form of progress bar etc.. Our aim is to track a 3month project.
Writing a macro in excel where you can use the data in your excel file to copy data to microsoft project.
I have an excel file of task name, deadline, time remaining, and assigned to and I want to copy those 4 columns to a correlating column in project. So basically I would loop through these fields on each line til I reach a blank which could be entering a varied amount of tasks.
The full macro would change ms project start date to today's date then copy the 4 columns from excel to project to add a new task for each line in my file and then save the project file.
I've seen some links on macro with project but most are more advanced then this or are exporting data from project to excel.
Is there any Software / Excel Add-in to provide VBA Project Documentation? I'm looking for something that can tell me which code does what? Which codes and functions are related. What are the references (with Other MS Office products / foreign-objects if any). How many codes and code names
A coworker is setting up an MS Project...project, and adding a custom field that would convert the Start date field into our Fiscal Quarter Fiscal Week schema, to display as FQFW, e.g. Q1W1. I've written the formula in excel, but I've never even touched Project until this week. Apparently it doesn't take formulas quite the same way as Excel does. I tried using the ''Switch" function in Project, and it worked, but it only accepts 14 arguments, and there are obviously 52 weeks we're dealing with. Would there be a way to do this using VBA? (I know next to nothing here as well.)
It works fine with several versions of Excel (2003, 2010, and 2013). But the problem arises when I move from Windows XP to Windows 7 or 8.
I use a scanner to scan barcode serial numbers into a textbox, and then populate these serial numbers with other associated data into a spreadsheet. The serial numbers are supposed to be separated by each line and placed into an array.
I get a compile error "Cant find project or library" with CHR highlighted in blue from this line of code...
SNs = Split(Str, Chr(10))
Once again, it works fine on many machines with XP, but not on Win 7 or 8.
Attached is a spreadsheet wherein I'm trying to extrapolate project costs across various months based on working days in a month subject to start and end dates of the project. Need an accurate formula to spread the cost.
I have a 2010 excel workbook with several locked worksheet (to which I manage the PW). I and another staff member manage different section of the macro but the other staff member doesn't have access to the locked areas.
Is there a way I can encrypt the password within VBA so it's not visible to the other staff member?
Locking the VBAProject doesn't work as the other staff member has to be able to edit his VBA section.
Many staff run the macro (via a button) and don't need to access the Macro and don't have access to the protected sheets.
I understand excel isn't ideal with PW protection for people wanting to bypass the protection and this isn't an issue.
I am using Mid function in my program. During execution, i am getting the waring message of "Complier Error: Cann't find project or library".I am not able to find the what is the reason behind on it. If really the library file missing.
I'm trying to protect my project so that others can't unhide a sheet I have tagged as veryhidden within VB.
I followed these steps: 1. Select project in the projects window 2. choose Tools 3. Project Properties 4. Protection tab 5. checked lock porject for viewing 6. entered passwords twice 7. clicked ok and saved
On another file this has worked perfectly as I wanted it to.
However on another very large file with multiple VB projects it is not "taking" on the project I need it to.
I can open the file, the VB project and change the setting on any sheet I need to without entering a password.