Reinstalled Project, macro won't work, clues as to why?

B

Brian Bonner

- exported my macro.
- changed to another laptop and installed Project
- imported my macro
** now the macro doesn't work. The error I'm getting is compile error: sub
of function not defined. for "s.Range(Cells(1, 1), Cells(I, 10)).Select" - it
highlights the first instance of Cells as the error.

I've been using this macro for a year and a half. Makes me think that
1) I needed to do something in the import that I didnt do or
2) there is something in the configuration/options of the new Project that I
forgot to set.
Can anyone give me some clues as to where to look? (I already put the macro
security to the lowest level.) Thanks.
 
J

John

Brian Bonner said:
- exported my macro.
- changed to another laptop and installed Project
- imported my macro
** now the macro doesn't work. The error I'm getting is compile error: sub
of function not defined. for "s.Range(Cells(1, 1), Cells(I, 10)).Select" - it
highlights the first instance of Cells as the error.

I've been using this macro for a year and a half. Makes me think that
1) I needed to do something in the import that I didnt do or
2) there is something in the configuration/options of the new Project that I
forgot to set.
Can anyone give me some clues as to where to look? (I already put the macro
security to the lowest level.) Thanks.

Brian,
Is this a macro for Project or Excel? It looks like it is the latter
although you did mention installing Project.

It appears like you need to set a reference to the Excel object library
since the Range or Cells objects aren't being recognized. In the VB
editor, go to Tools/References and look for a reference to the Excel
object library. It might be that your previous installation had a
different version of Excel so the wrong reference is checked. If that is
the case you will see an "unavailable" (or something similar) next to
the Excel reference.

It could also be that the Excel object library was not installed on your
current laptop. If there is no Excel object library shown in references,
you will need to update the Excel installation on your current laptop -
pick up the missing VBA components.

There are your clues.

John
Project MVP
 
B

Brian Bonner

John that was more than a clue... that was the answer!! I had forgotten to
add the reference to the Excel object library. When you come to San Francisco
the first margarita is on me. btw - it is a Project macro to export notes
to Excel.
 
J

John

Brian Bonner said:
John that was more than a clue... that was the answer!! I had forgotten to
add the reference to the Excel object library. When you come to San Francisco
the first margarita is on me. btw - it is a Project macro to export notes
to Excel.

Brian,
Great, problem solved.

By the way, did you write the notes export macro yourself or did you get
it from someone else? If you got it from someone else, where did you get
it? I wrote just such a macro a few years ago and I have distributed it
to many requesters since then. Maybe it's the one I wrote.

John
Project MVP
 
B

Brian Bonner

If you are John Jensen it is indeed your macro, modified a lot to fit my
needs, but yours. Its a great macro and -very- important to me. Thanks for
doing it.
 
J

John

Brian Bonner said:
If you are John Jensen it is indeed your macro, modified a lot to fit my
needs, but yours. Its a great macro and -very- important to me. Thanks for
doing it.

Brian,
I guess the good stuff gets around :)

John
 

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