CS>>> Re: Wordbasic global variables
CS>>>
CS>>> > Can I define a global variable in wordbasic 7?
CS>>> > More precisely I need a variable that can be seen by all the macros
f
CS>>> > my model.
CS>>> > Bye, AndreaI use the SetDocumentVar and GetDocumentVar commands.
Wordhelp> The SetDocumentVar statement associates the string
Wordhelp> VariableText$ with the active document. You use the
Wordhelp> VariableName$ argument with the function
Wordhelp> GetDocumentVar$() to return the associated string when
Wordhelp> the document is active. The variable is saved with the
Wordhelp> document. You can set multiple document variables for a
Wordhelp> single document. If the insertion point is not in a
Wordhelp> document --- for example, if the macro-editing window
Wordhelp> is active --- an error occurs.
SetDocVar seems like a clumsy way to communicate between macros,
since it apparently bloats the size of documents.
I saw a better message that echoed my suggestion of using
Result-returning functions to generate the appearance of Global
variables.
Since, accoding to MicroSoft Help Desk's clerk, opening macros
uses file-handles, that just plunges me deeper into the 'out of
memory" problem.
Christopher.Greaves@WESTONIA.com
* 1st 2.00b #6263 * People and Computers
--- PCBoard (R) v15.3/25
---------------
* Origin: Westonia Computer Systems 1:250/636 (416)241-1981 (1:3615/51)
|