Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VBA problem in PP11

1 view
Skip to first unread message

horst

unread,
Nov 13, 2003, 8:40:07 PM11/13/03
to corel.graphic_apps.draw-script

Hi,
I'm trying to translate a script into VBA, but I'm having big problems
I have 2 objects and I want to add a shadow to them:
(I cut the operation in small chunks in order to try to find the errors)

dim L as Range
dim Lrange as Range
dim Lobj as ObjectLayer
dim Lds as DropShadow

Set Lrange = ActiveDocument.Layers.Paste 'copy the objects from clipboard
set L = Lrange.Combine() 'combines the 2 objects
set Lobj = L.ObjectLayer 'and here I get the error "object
variable not set" (translated into english)
set Lds = Lobj.DropShadow 'here I want to add the shadow

Lds.angle=10 'and here I get also an error as it is Read-only: how
can I set the angle of the shadow?

Hope to find someone who is able to help me!
Thanks
Horst


Kostya

unread,
Sep 4, 2004, 8:40:14 AM9/4/04
to corel.graphic_apps.draw-script

Probably it's bug.

I wrote:

Dim L As Layer
Dim Lrange As LayerRange
Dim Lobj As ObjectLayer
Dim Lds As New DropShadow

Set L = ActiveLayer
Set Lobj = L.ObjectLayer
Set Lds = L.ObjectLayer.DropShadow

Debug.Print Lds.Type

and I have got message: ActiveX component can't create object.

It's means (short citing from VBA help):

The class isn't registered. For example, the system registry has no mention of
the class, or the class is mentioned, but specifies either a file of the wrong
type or a file that can't be found.

A DLL required by the object can't be used, either because it can't be found, or
it was found but was corrupted.

The object is available on the machine, but it is a licensed Automation object,
and can't verify the availability of the license necessary to instantiate it.

You are trying to use the GetObject function to retrieve a reference to class
created with Visual Basic.
GetObject can't be used to obtain a reference to a class created with Visual
Basic.

Access to the object has explicitly been denied.

End of citing.

--- Kostya

"horst" <penro...@bluewin.ch> сообщил/сообщила в новостях следующее:
news:3FB4327...@bluewin.ch...

0 new messages