Link to home
Start Free TrialLog in
Avatar of North
North

asked on

Problems with Classes

Hi,

I have a ActiveX OCX control which contains several usercontrols, and four class modules which essentially provide the same collection as the comctl Listview:

ListView (UserControl) ->
    ListItems (Col) ->
        ListItem(Class) ->
            ListSubItems (Col) ->
                ListSubItem(Class)

(Obviously not with the same names as the comctl control.)  

There is also a basic History Collection and class.


This works fine on my machine and every test machine I run it on in my office.  But when i compile the ocx and the program and copy them onto the client machine
(running regsvr32 on the OCX) I get an Automation Error with no number or description, before anything is visible on the screen (I declare the History object in the startup module).

I have all the Class Modules declared as GlobalMultiUse.

The user's machine's are NT4 SP6, and the IT support people use NT policies all over the place to lock down the machines.  I have several other pieces of software written in VB working on these machines, the only major difference with this new one is the class modules and the fact it is an MDI app.  That's why i suspect the class modules.

Please tell me one of you guys has crossed this bridge before as I am starting to wear a head shaped dent in my desk...

Cheers,

North
ASKER CERTIFIED SOLUTION
Avatar of RanaHossain
RanaHossain

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JohnMcCann
JohnMcCann

Is it possible the target machines use different versions of the controls you are using, or different versions of any dll declarations.

When you said running regsvr32 on the OCX

did you mean you manualy install the programs.

It may be worth trying different package and deployment programs as one of these make pick up a missed dependency or scrutinise there versions better.
Is the target computer a XP machine?   Is the machine that did the compiling XP?
An Automation Error message with no number generally means, according to Microsoft, that you are raising an error with Err.Raise and a number that is not a regular number.  Try compiling your usercontrol with debug code to write a text file and see where it stops.  Then start from there.
Avatar of North

ASKER

Hi all,

Thanks for all responses and apologies for my absence, i'm in the UK and left work at 6.

Rana: Sounds like a plausible answer as the target machines are locked up very tight.

John: I am manually putting the exe on the machine as it takes an entire week to get the proper paperwork signed and an IT guy out to log in as an administrator and install the software.  It also has to go through office testing which can take another week.  They are extremely paranoid about a user breaking a machine, so the client wanted a work around for the short term.  It's the bane of my life!

Merphie, target is NT4, I develop under XP but compile on NT4.  This works fine with my other progs.

webJose: The first line of code doesn't even execute, so I can only assume that it is one of the declarations killing the prog.

Rana, I will download these files and look into it, it does seem the most likely answer at the moment.

Thanks again to everyone.

North
Avatar of North

ASKER

Hi,

Having finally got to the bottom of this I discovered that the user was telling me one thing and actuallity was completely different.  So this question was pretty much redundant, I don't know why we bother with users! ;-)

But that said, Rana's comments did inspire me to learn more about classes, and the site he linked to will certainly come in handy elsewhere so the points go to him.

Thanks to all,

North