TIP: Click on subject to list as thread! ANSI
echo: ms_word
to: TOMASZ EFNER
from: BOB DAVIS
date: 1996-07-13 06:51:00
subject: Passing parameters to macros

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.