OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 23-11-2006, 02:00
Posts: n/a
Default Urgent Help: Alex: with Corel VBA and Visual basic program


I have a Visual basic program which invokes the corel macro.

I just wanted to know is it possible to write a function which returns some string value back to the Calling visual basic program.


Visual basic program

dim abd as String

abd="call abc corel macro".

Corel macro

public function abc() as String

Activedocument.getsize dbla,dblb
dblTotlssize = dbla + dblb

returm dbltotalsize ''this has to be returned to the visual basic program.

Any help is appriciated

Thank You
Reply With Quote
Old 23-11-2006, 08:57
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4

Yes, it's possible. In VB/VBA you just assign the return value to the function name:

Public Function abc() As String
   ' Do something
   abc = "Some String"
End Function
In VB.NET you can either do the same or use the Return statement as you showed above.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where can i get good tutors, docs, manuals by Corel VBA ama CorelDRAW/Corel DESIGNER VBA 2 19-02-2004 09:17
Can Corel 11 & VBA Do This? Ron Corel Photo-Paint VBA 0 14-12-2003 19:48

All times are GMT -5. The time now is 19:35.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com