Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

Application.Run and return result from a function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Flemming Dahl - 01 Dec 2004 17:45 GMT
Hi all,

I am using Application.Run to run a Sub from a global add-in, and this works
fine.
Application.Run "Module.SubName", "Parameter"

But I when it comes to run a function and get the result back, I am trying
this:
MyString = Application.Run "Module.FunctionName", "Parameter"

Am I doing it the right way? or can't I get the result return?

Thanks,
Flemming
Peter - 01 Dec 2004 18:00 GMT
You have the right idea, now just wrap the parameters to Application.Run in parentheses:

MyString = Application.Run("Module.FunctionName", "Parameter")

hth,

-Peter

> Hi all,
>
[quoted text clipped - 10 lines]
> Thanks,
> Flemming
Flemming Dahl - 01 Dec 2004 18:02 GMT
Hi Peter

Yes I just found out - how blind can one be :-)

Thanks
Flemming

You have the right idea, now just wrap the parameters to Application.Run in
parentheses:

MyString = Application.Run("Module.FunctionName", "Parameter")

hth,

-Peter

> Hi all,
>
[quoted text clipped - 10 lines]
> Thanks,
> Flemming
Peter - 01 Dec 2004 18:40 GMT
> Hi Peter
>
> Yes I just found out - how blind can one be :-)

I don't know, I keep pushing the limits. :-)

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.