TE> Does anyone knows how to pass parameters to macros? I need
TE> to chande them in macro and then pass them back to place
TE> from it was called (hmm, it sounds very complicated, but it
TE> isn't).
The following comes directly from the help topic in Word
titled "Sub...End Sub".
Bob
Sub...End Sub Example
In this macro, the main subroutine calls the GoBeep
subroutine, passing the number of times to beep through the
variable numBeeps:
Sub MAIN
numBeeps = 3
GoBeep(numBeeps)
End Sub
Sub GoBeep(count)
For n = 1 To count
Beep
For t = 1 To 100 : Next 'Add time between beeps
Next
End Sub
If the GoBeep subroutine were in a macro named LibMacros,
the call to the subroutine would be as follows:
Sub MAIN
numBeeps = 3
LibMacros.GoBeep(numBeeps)
End Sub
For more information about using subroutines in different
macros, see Chapter 4, "Advanced WordBasic," in the
Microsoft Word Developer's Kit.
--- timEd/2-B11
---------------
* Origin: The Fireside BBS Houston TX (713)496-6319 (1:106/114)
|