ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sub or Function not defined (https://www.excelbanter.com/excel-programming/440378-sub-function-not-defined.html)

dCromley

Sub or Function not defined
 
Long time XL97 user, now XL2003.
I've used excel macros for years and don't remember having to do this:

I have macros in my Personal.xls that I use in all my workbooks.
If I get "Sub or Function not defined" error, I have to reference
Personal.xls using Tools/References and pick it out.

But Personal.xls is named "VBAProject(PERSONAL.XLS)" and my new
workbook is named "VBAProject(Book1.xls)", so I get
"Name conflicts with existing module, project, or object library".
So I have to make my Personal.xls in a different project.
I do this in the project explorer by right-clicking
"VBAProject(PERSONAL.XLS)" and hitting properties and changing
the project name. Then I can add it as a reference.

See http://support.microsoft.com/kb/156882

Like I say, I don't remember having to go thru all this, and I found
few hits on searching this, so that's the reason for this post.

Maybe I missed something, because why can't I just use the
Personal.xls in the same project without even adding a reference?


All times are GMT +1. The time now is 04:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com