Run Time error 424

A

AlanB

I see a number of people have had this problem, but after following all
the suggestions I still get the same problem. Runtime error 424: Object
required.

It errors on the following piece of code:

Sub dwn(I As Integer)
Set xlRow = xlRow.Offset(I, 0) == ERROR ON THIS LINE
End Sub

I have amended the follwoing lines:

Dim xlRow As Excel.Range
Dim xlCol As Excel.Range

to

Public xlRow As Excel.Range
Public xlCol As Excel.Range

I have 6 references checked, including Excel.

One of the posts I have seen suggests removing blank project lines -
which I have done.
Another post suggested that lines with "format duration" may have been
added - can't see them in my macro(which I copied from Jack).

I called the macro ExcelExport, and I am running it by calling Task
Hierarchy.

Just in case anyone has an alternative - here is the issue I a trying
to resolve.

I have set up a Project Plan, with all the tasks and their
dependancies. We have an estimating model that spits out the effort for
most of the tasks in Excel format. My plan was to export the plan to
excel, and using macros, update the mandays effort needed from the
estimation into the plan (excel format). Then import the plan back into
excel, so that I can resource it. This worked well, but The excel
spreadsheet did not show the tasks and subtasks structure. So on
reimport I have to recreate the task/subtasks structures.

Thanks in advance for your help
 
A

AlanB

AlanB said:
I have set up a Project Plan, with all the tasks and their
dependancies. We have an estimating model that spits out the effort for
most of the tasks in Excel format. My plan was to export the plan to
excel, and using macros, update the mandays effort needed from the
estimation into the plan (excel format). Then import the plan back into
excel, so that I can resource it. This worked well, but The excel
spreadsheet did not show the tasks and subtasks structure. So on
reimport I have to recreate the task/subtasks structures.

Thanks in advance for your help

Amazing what writing down the problem can do for you - my business
problem is solved by merging my excel spreadsheet to the plan - thus
importing only the data that I need, and not overwriting my hierarchy.

So the problem with the macro is academic, however I am still
interested in the solution if anyone has one

Thanks
 
J

John

AlanB said:
Amazing what writing down the problem can do for you - my business
problem is solved by merging my excel spreadsheet to the plan - thus
importing only the data that I need, and not overwriting my hierarchy.

So the problem with the macro is academic, however I am still
interested in the solution if anyone has one

Thanks

AlanB,
I assume you used a simple export map to get the data from Project to
Excel and that will not preserve file formatting (e.g. indentation, font
characteristics, etc.). There are multiple ways to retrieve hierarchy
indentation. One is to include the Outline Level in the export and then
use it to set up the hierarchy in Excel. Another method is to use VBA
for the export (and import) of data between Project and Excel. For an
example of the latter go to: http://masamiki.com/project/macros.htm, and
take a look at fellow MVP, Jack Dahlgren's macro called "export
hierarchy to Excel".

Hope this helps.
John
Project MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top