Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 97 - Lost Class Modules

Status
Not open for further replies.

polljoh

Programmer
Apr 8, 2003
6
0
0
GB
Some very strange things have happened with an Excel 97
spreadsheet I have been developing.

I had created two class modules to deal with getting
external data.

I had code behind a worksheet which handled options
selecteted in listboxes embedded in the worksheet.

I also had a couple of standard modules.

I opened the workbook yesterday and the class modules had
dissappeared as had the code behind the worksheet. All
code in the standard modules was still there.

Fortunately I had exported the class modules. After having
imported the class modules I am trying to recreate the
code I had developed behind the worksheet.

However in the worksheet module I cannot reference the
controls with the ME keyword. The controls also do not
appear in the object dropdown box. If I try to run any
code referencing the controls I get the error message

Compile Error:

User defined type not defined

Also when I selct the control on the worksheet the
Properties box does not diplay anything for the object. It
simply displays the properties for the worksheet. Its as
if the controls do not exist.

I am wondering if the loss of the class modules and code
behind the worksheet is a related problem to the "non-
existent" controls.

I am completely bewildered and would appreciate any help
anyone can give.

Regards
JOHN.
 
Well have you checked if you have some missing libraries?

Thanks Whitebat
 
Yes I did check the references. One class module needs a reference to DAO which exists. The other class module uses late binding and codes against the Cognos Power Play OLE Automation Object. I use late binding since the type library is not installed on other client machines that will use the spreadsheet application.

However my current problem relates to controls embedded from the forms Control ToolBox. The references I have are :

VBA
Excel 8.0
OLE Automation
Office 8.0
DA0 3.51

There are no apparent "missing" refernces.

Am I missing any ?


Thanks
JOHN
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top