OberonPlace.com Forums  

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

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

Hi!!

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.

e.g

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
Amol
Reply With Quote
  #2  
Old 23-11-2006, 09:57
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

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

Code:
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
Reply


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 10:17
Can Corel 11 & VBA Do This? Ron Corel Photo-Paint VBA 0 14-12-2003 20:48


All times are GMT -5. The time now is 16:01.


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