ActiveX problem under win98

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ActiveX problem under win98

Bruno Brasesco
Hi,

I have an application perfectly running on XP.

But on win98 i have a small issue with ActiveX (Excel package).
(i deploy -activex wizard- Excel package under win98).
Win98 - Excel 9.0 Object Library
WinXP - Excel 11.0 Object Library

04:20:07 p.m., Jueves, 18 de Agosto de 2005: 'HRESULT Error: Imposible
asignar la propiedad Protect de la clase Worksheet. (FACILITY_CONTROL)'
IDispatch>>invokeId:flags:parms:retVal:
IDispatch>>invokeId:flags:parms:
IDispatch>>doesNotUnderstand:
SMExcelReport(BBExcelReport)>>protectActiveSheet
SMExcelReport(BBExcelReport)>>openFileReadOnly:
SURInternacionComposite(Presenter)>>createReport:arguments:using:
SURInternacionComposite(Presenter)>>createReport:arguments:
SURInternacionComposite(Presenter)>>createReportFor:report:
SURInternacionComposite>>reportSaldoActual

" Impossible to assign Protect property to the class Worksheet.
(FACILITY_CONTROL) "

At first i thought that version differeces could be the problem, but if
a do a macro in VB on Excel (9.0 ol) it works perfectly.

Any idea ?

Regards Bruno

PS:
BBExcelReport
protectActiveSheet
        ^excel activeSheet protect: self defaultProtectPassword
                drawingObjects: true asVariant
                contents: true asVariant
                scenarios: true asVariant
                userInterfaceOnly: true asVariant
                allowFormattingCells: true asVariant
                allowFormattingColumns: true asVariant
                allowFormattingRows: true asVariant
                allowInsertingColumns: true asVariant
                allowInsertingRows: true asVariant
                allowInsertingHyperlinks: true asVariant
                allowDeletingColumns: true asVariant
                allowDeletingRows: true asVariant
                allowSorting: true asVariant
                allowFiltering: true asVariant
                allowUsingPivotTables: true asVariant


Reply | Threaded
Open this post in threaded view
|

Re: ActiveX problem under win98

Schwab,Wilhelm K
Bruno,

> " Impossible to assign Protect property to the class Worksheet.
> (FACILITY_CONTROL) "
>
> At first i thought that version differeces could be the problem, but if
> a do a macro in VB on Excel (9.0 ol) it works perfectly.

Perhaps of no help: In your VB example, have you checked whether the
property has the desired effect?  It could be that Excel is ignoring the
error, as you could to by trapping it or detecting the OS and skipping
the step.  It is also possible that they accomplish the same thing
another way.

Have a good one,

Bill


--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: ActiveX problem under win98

Bruno Brasesco
> Perhaps of no help: In your VB example, have you checked whether the
> property has the desired effect?  It could be that Excel is ignoring the
> error, as you could to by trapping it or detecting the OS and skipping
> the step.  It is also possible that they accomplish the same thing
> another way.

Yes, it has the desired effect (protect cells contents).
After the report is created nobody can modify it.

Like you say i ask for OS version and trap the error.
But this protection is a must for each user.

Regards Bruno


Reply | Threaded
Open this post in threaded view
|

Re: ActiveX problem under win98

Schwab,Wilhelm K
Bruno,

> Yes, it has the desired effect (protect cells contents).
> After the report is created nobody can modify it.

So either they are hacking based on the OS, or perhaps there is
something about the version numbers that is causing troubles.  I am not
certain exactly how to do this, but you might look at the app ID and
version on both 2k/xp and 9x boxes.  Perhaps the type library analyzer
has hard coded something that is inappropriate for the 9x machine???
Blair might be able to springboard this concept to something that is
actually useful :)

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: ActiveX problem under win98

Chris Uppal-3
In reply to this post by Bruno Brasesco
Bruno wrote:

> IDispatch>>invokeId:flags:parms:
> IDispatch>>doesNotUnderstand:
> SMExcelReport(BBExcelReport)>>protectActiveSheet

Something has just struck me as odd about this, it's probably a red-herring,
but for what little it's worth...

If you've generated the wrappers, then it seems wrong that the IDispatch DNU
handling should be invoked at all.

Also, #protect:drawingObjects:contents:etc:etc:etc: doesn't sound like a
"property" to me, so the error message seems odd too.

Have you tried re-generating the wrapper classes for Excel 9 ?  Maybe something
would should up as different from the (presumably v11) wrapper that you created
under WinXP ?

    -- chris