Re: Exporting Hierarchy to Excel (Jack`s Macro)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



In article <4B5BBB93-08DA-4AF2-B2D3-FD27B88EDE25@xxxxxxxxxxxxx>,
Bahareh <Bahareh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Oh yes. I forgot to do that so one problem solved. But the problem in last
lines still exist:

Sub dwn (i As integer)
Set xlrow=xlrow.offset(i,o)
End sub

The error message mentioned:

"Run-time error (424)
Object Requierd"

What Can I do?

Thanks for your response

Bahareh,
Your original post specifically said that you set the reference to the
Excel object library so how did it get un-set? Once it is set for a
module, it doesn't need to be set again unless a new module is created.

With regard to your existing problem, the error message is pointing to
the fact that "xlrow" is not defined as a valid object. Try this, at the
very beginning of the code are the following two lines:
Dim xlRow As Excel.Range
Dim xlCol As Excel.Range

Change those lines to the following:
Public xlRow As Excel.Range
Public xlCol As Excel.Range

Now try it. Does it work?

John
Project MVP



"Jan De Messemaeker" wrote:

Hi,

This one is easy, I'll take it straightaway
In the VB Editor, go to Tools, References, look for Microsoft Excel and
check the checkbox.
HTH

--
Jan De Messemaeker, Microsoft Project Most Valuable Professional
http://users.online.be/prom-ade/
For FAQs: http://www.mvps.org/project/faqs.htm
"Bahareh" <Bahareh@xxxxxxxxxxxxxxxxxxxxxxxxx> schreef in bericht
news:E1C181D2-C4C2-417C-9BD1-7D393AB6D607@xxxxxxxxxxxxxxxx
Hello

I checked the code that I pasted into VB editor, all the lines exist and
also the problem still exists. Another problem is occured in the line
following here:

Sub TaskHierarchy()
Dim xlApp As Excel.Application

Error says That it isn`t defiend.

what is wrong with my Pj Plan? What can I do?

Thanks

"John" wrote:

In article <1B22FE7C-7552-4D1C-9210-3F66436F85FF@xxxxxxxxxxxxx>,
Bahareh <Bahareh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Hello

I need to export hierarchy to excel. I used Jack Dahlgren`s VBA macro
but it
doesn`t work. (I cheched Microsoft excel library ... in resource/tools
menue).
It shows a message box which say:

"
Run-time error (424)
Object Requierd
"
In debug window The line which is shown yellow is in the last lines.

"
Sub dwn (i As integer)
Set xlrow=xlrow.offset(i,o)
End sub
"

I selected the tasks and runed the Macro but The problem still exist.
Can anybody help me? Jack may you solve the problem?

Thanks

Bahareh,
Jack's code does run - I just tried it myself. One thing I did note
however is that when I copied and pasted the code from Jack's website
into the VB Editor, I had to do some editing to satisfy the complier.
The copy and paste process apparently introduced some hidden tabs or
other characters that had to be edited out. Whenever code is edited like
that it is fairly easy to inadvertently delete a line of code. It sounds
like that is what happened to you. I would check the code in your VB
editor and make sure it has all the lines that are shown on Jack's
website.

John
Project MVP




.



Relevant Pages

  • Re: Clear CheckBoxes using VBA
    ... But I'm getting the following error message. ... Run-time error "438" ... Object doesn't support this property or method ... Sub Add_New_RFI ...
    (microsoft.public.excel.misc)
  • Re: Error problem
    ... > Daily Dose of Excel ... No error message is raised so it's making debugging ... >> then the run-time error does occur, ... >> would run-time errors behave one way in one sub, ...
    (microsoft.public.excel.programming)
  • Re: Exporting Hierarchy to Excel (Jack`s Macro)
    ... Sub dwn ... "Run-time error ... I checked the code that I pasted into VB editor, ...
    (microsoft.public.project)
  • Re: Wie kann ich im Excel zwei Zellen gleichsetzen?
    ... Makro / VB Editor ... Mappe Du damit beeinflußt. ... Und prompt hast Du schon den Rahmen für Deinen Code sofern es Sub ... >> End If ...
    (microsoft.public.de.excel)
  • RE: Word as Editor with Legault Code
    ... but I would like to use Microsoft Word as my email editor. ... > Private Sub Application_Startup ... > Set objInspectors = Application.Inspectors ... > Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector) ...
    (microsoft.public.outlook.program_vba)