
Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
> I have a VBA macro that I am using and I want to call another macro.
> I have been tried the two versions of calling a macro below.
[quoted text clipped - 18 lines]
>
> Thanks for any help.
Greg, for some reason, this has just confused me. I'm sure it relates to
what I am trying to do, but I can't see it just yet.
I have a range called noticeplus, A macro named PrintNOH and I want to call
another macro called printhrformsRep. How do I translate what you have to
that? i.e. is what you are calling test where I would put the
printhrformsrep macro? Do I need to declare any additional variables? For
instance the word TEST on a line by itself doesn't make sense to me. (But
then, I'm pretty much a beginner in this, so that is probably why.)
Thanks for your help
> Sub ScratchMacro()
> Dim oRng As Word.Range
[quoted text clipped - 31 lines]
> >
> > Thanks for any help.
Greg Maxey - 12 Sep 2007 01:12 GMT
Elaine,
Sorry for confusing you. I took for granted that you would copy the code
into your VB Editor and run it to see what happened ;-)
"Test" is the macro that I am calling from ScratchMacro. I simply showed
you four different was that I could call it.
1. Test
2. Call Test
3. Application.Run MacroName:="Test"
4. Application.OnTime When:=Now + TimeValue("00:0:02"), Name:="Test"
I set oRng to the selection range just to show you that has nothing to do
with calling a macro.
Copy the code I sent you into your editor and select the Run method. Then
press F1. The help file and examples may clear things up.

Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
> Greg, for some reason, this has just confused me. I'm sure it
> relates to what I am trying to do, but I can't see it just yet.
[quoted text clipped - 51 lines]
>>>
>>> Thanks for any help.
Elaine J. - 12 Sep 2007 01:42 GMT
Greg, thanks so much. I think I can see my error now. I was using this
format Application.Run MacroName:="[PrintHRFormsRep]" (from a sample that I
was looking at.). It looks like I need to remove the brackets.
I appreciate your help.
> Greg, for some reason, this has just confused me. I'm sure it relates to
> what I am trying to do, but I can't see it just yet.
[quoted text clipped - 43 lines]
> > >
> > > Thanks for any help.