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.
 
Hey there
I know the raison why you don't get the properties of your control. I try to explain in my very best English (i'm Flemish)
on the commandbar with the set of controls you have a picto with a pencil and a blue triangle.pussing this button is a switch between the 2 modus(design or workmodus???).
Try this and you can see the properties of your control.
don't use the command "ME" . When you have the control in designmodus double click on it and you see the VBA screen where you can select an Event to put your progs in it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top