TIP: Click on subject to list as thread! ANSI
echo: ms_word
to: CHRISTOPHER GREAVES
from: BOB DAVIS
date: 1996-11-17 19:12:00
subject: PASS VALUES BETWEEN MACRS

CG>                 How does one preserve and pass a value from
CG> one                  macro to another?
Here's a quick example
Sub Main
        A$="Bob Davis"
        doit(A$)
End Sub
Sub doit(Myname$)
        Msgbox Myname$
End Sub
CG> I know to use "Dim Shared" within a macro in order to
CG> communicate  between subroutines and functions within the
CG> one macro body, but  now I want to carry data across macros.
CG> Here's an example of use:
Create a library of macros and store them in some meaningful macro name like 
Mylibrary. Here's a skeleton for Mylibrary.
 Sub number1
 ...
 End sub
 Sub number2
 ...
 End Sub
 Sub number3
 ...
 End sub
Now to call the subroutine named number2 from another macro, you would use 
the form:
        Mylibrary.Number2
CG> Now I know that half of you are going to say "Chris, you can
CG> do  that with Format Painter", but (1) you can't
Why can't you?  As long as you highlight the whole paragraph, including the 
paragraph mark when you capture the style, format painter works fine.
Bob
--- 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™.