Globale Variable 
Author Message
 Globale Variable

Hallo NG,

wie kann ich eine Variable deklarieren, dass ich sie
z.B. in Word setze und in Access lese?

Felix



Fri, 02 Dec 2005 22:29:53 GMT  
 Globale Variable
In Word VBA
(ThisDocument - Modul)
Function GetMyGlobalVar() As String
    GetMyGlobalVar = "Hello World"
End Function

In Access VBA
    Dim d As Word.Document
    Set d = GetObject("d:\MyDocs\Word\test\GlobalVar.doc")
    MsgBox d.GetMyGlobalVar
    d.Close 0

Krgrds,
Perry



Quote:
> Hallo NG,

> wie kann ich eine Variable deklarieren, dass ich sie
> z.B. in Word setze und in Access lese?

> Felix



Sat, 03 Dec 2005 04:27:06 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. print variable, variable, variable etc

2. Referencing Global Variable from a variable

3. Error msg: Object variable or With block variable not set

4. Expanding a variable or referencing a field within variable

5. Obfect variable or With block variable not set

6. How do I use contents of variable as field name(db!rst!variable)

7. converting an object variable (name of a file) into a string variable

8. Object Variable With Variable Not Defined Error

9. how do i convert a string variable to a control variable

10. Object variable or With block variable not set when calling COM Dll

11. Manipulating variables/objects with variables

12. Use a public variable or use Private variable with Get and Set

 

 
Powered by phpBB® Forum Software