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

Going from script to VBA. Please help.

3 views
Skip to first unread message

JKE

unread,
Jan 12, 2001, 5:52:08 AM1/12/01
to
I installed Corel Draw upgrade 10 over vers. 8

Since the script editor has been dropped (a bummer!) I'm trying to learn how to
use VBA.

I have trouble moving from square one!

How do I do things in VBA?? The environment is so much different.

So when I have PP10 running I select Tools->Visual Basic->Visual Basic Editor.
Visual Basic comes up. So now I want to write a *real* simple script that does
something in PP 10.
So this is a programming evironment ... so I try File ... there must be a "New
file" ... but there isn't. What gives??

[I read the helps ... scan this area for some sample code]

Ok I found some sample code:
Set pp = CreateObject("CorelPhotoPaint.Application.10")
Set csc = pp.CorelScript
csc.FileNew 700, 200, 1, 96, 96, False, False, 0, 0, 0, 0, 0, 0, 0, 0, 0, True

How do I enter the code someplace and run it??


Please someone help. I'm not new to programming but the VBA interface is
different from what I've been using. I'm used to having source files (*.c, *.csc,
etc) which are compiled and run. How do I do this in VBA?

Alex Vakulenko

unread,
Jan 15, 2001, 4:00:26 PM1/15/01
to
> I get an error when I write some code and try to compile it. See JPG file.

Sorry, it's my mistake. The code should read:

Sub MyTestSub()
...
End Sub

So, replace "Dim" with "Sub". I don't know why I typed Dim in that place?
:-)


--
Alex


JKE

unread,
Jan 15, 2001, 3:50:00 PM1/15/01
to
Thank you for replying.

JKE

unread,
Jan 16, 2001, 3:46:15 AM1/16/01
to
Thank you. Now I'm getting some work done.
0 new messages