Opening a form an using function fron an other template 
Author Message
 Opening a form an using function fron an other template

Hi,

How can i open Userform  and function who are in a other template. The
template whith the form and the function are in the startup template of
Word2000

Thanks

Olivier



Mon, 07 Oct 2002 03:00:00 GMT  
 Opening a form an using function fron an other template
Hi Olivier,

Quote:
> How can i open Userform  and function who are in a other template. The
> template whith the form and the function are in the startup template of
> Word2000

You can run a procedure that displays the UserForm using

    Application.Run "ProjectName.ModuleName.ProcedureName"

To return values from a function, you need to have a reference to the
other project, and the function should be in the ThisDocument class
module of that project. For example

Sub TestTest()
    Dim UserInput As String
    UserInput = TestProject.ThisDocument.GetInfo
    Debug.Print UserInput
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Wed, 09 Oct 2002 03:00:00 GMT  
 Opening a form an using function fron an other template
Thanks Cindy for your help

I greatly appreciate it

Olivier



Quote:
> Hi Olivier,

> > How can i open Userform  and function who are in a other template. The
> > template whith the form and the function are in the startup template of
> > Word2000

> You can run a procedure that displays the UserForm using

>     Application.Run "ProjectName.ModuleName.ProcedureName"

> To return values from a function, you need to have a reference to the
> other project, and the function should be in the ThisDocument class
> module of that project. For example

> Sub TestTest()
>     Dim UserInput As String
>     UserInput = TestProject.ThisDocument.GetInfo
>     Debug.Print UserInput
> End Sub

> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister
> http://go.compuserve.com/MSOfficeForum

> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)



Wed, 09 Oct 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. opening form on opening template

2. Using data to specify forms/functions to open/call

3. Open Word with template and macro by shell function

4. How to make a template of DLL′s from languages others than C

5. Forms Collection: Using it to Open Forms by Passing the Form Name as a String Variable

6. open outlook template using VB 6

7. Open and Populate Outlook template using VBA

8. Word Template using activeX fields not usable when opened on Mac

9. Refering to Functions and Subs held in one global template from another global template

10. Lose VBA Code when opening form from Template

11. Opening Word File Using Template

12. open a MS Word Template using VB

 

 
Powered by phpBB® Forum Software