ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Compile Error on "dim x as VBComponent"? (https://www.excelbanter.com/excel-programming/289601-compile-error-dim-x-vbcomponent.html)

PatFinegan[_7_]

Compile Error on "dim x as VBComponent"?
 
I get a Compile Error ("User-defined type not defined") whenever I
attempt to dim anything as "VBProject" or "VBComponent", even though
both objects are documented by Excel help. Am I missing something
simple?

I'm using Excel 2003, Office Pro Edition. Same problem on a different
PC running Excel 97.

Thanks in advance.


---
Message posted from http://www.ExcelForum.com/


Chip Pearson

Compile Error on "dim x as VBComponent"?
 
Pat,

You need to set a reference to the extensibility library. In the
VBA Editor, go to the Tools menu, choose References, and then
scroll down to and check "Microsoft Visual Basic For Applications
Extensibility Library".


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"PatFinegan " wrote
in message ...
I get a Compile Error ("User-defined type not defined")

whenever I
attempt to dim anything as "VBProject" or "VBComponent", even

though
both objects are documented by Excel help. Am I missing

something
simple?

I'm using Excel 2003, Office Pro Edition. Same problem on a

different
PC running Excel 97.

Thanks in advance.


---
Message posted from http://www.ExcelForum.com/




PatFinegan[_8_]

Compile Error on "dim x as VBComponent"?
 
I knew it had to be simple. Of course, I then discovered that I had to
change my security settings (Excel 2003 apparently differs from Excel
97 on "Trested Publishers").


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 01:41 PM.

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