visual basic question (easy one)
very easy if you know the command/syntax
I have a variable v inside macro1. Macro1 uses (ie calls) macro3 which also uses the same variable v. I can't get macro3 to reflect the true value of v as determined from macro1.
I beleive it's something to do with public/private declaration ?
Q1 - is there an easy command in macro3 that takes the value for v from macro1 ?
something like v = v["macro1"]()
Q2 If not, what's the public/private declaration, where does it go, and what's the correct syntax.
Q3 What if there is a macro2 between macro1 and 3. (ie macro1 calls macro2, which calls macro3)
Does this complicate matters in terms of commands/syntax etc.
Non technical answers please as am not in IT.
Thanks, airhead
I have a variable v inside macro1. Macro1 uses (ie calls) macro3 which also uses the same variable v. I can't get macro3 to reflect the true value of v as determined from macro1.
I beleive it's something to do with public/private declaration ?
Q1 - is there an easy command in macro3 that takes the value for v from macro1 ?
something like v = v["macro1"]()
Q2 If not, what's the public/private declaration, where does it go, and what's the correct syntax.
Q3 What if there is a macro2 between macro1 and 3. (ie macro1 calls macro2, which calls macro3)
Does this complicate matters in terms of commands/syntax etc.
Non technical answers please as am not in IT.
Thanks, airhead
Scooby Regular
iTrader: (13)
Joined: Jan 2001
Posts: 4,997
Likes: 0
From: Midlands - between notts and derby !
You dont say which app. But under the general declartions section when you use the visual basic editor. For the module which shares macro 1 and macro 3 then put
Dim v As Integer
in and this will make v available to both macros.
Dave
Dim v As Integer
in and this will make v available to both macros.
Dave
Thread
Thread Starter
Forum
Replies
Last Post
Pro-Line Motorsport
Car Parts For Sale
2
Sep 29, 2015 07:36 PM



