PC Review


Reply
Thread Tools Rate Thread

Continuous Macros

 
 
=?Utf-8?B?QmVlcCBCZWVw?=
Guest
Posts: n/a
 
      30th Jan 2007
I have a number (7) of macros and would like to go to each one when the
previous one is finished running. I forgot the vba command to put at the end
of the macro to direct it to the next macro.

Thanks
Frank
 
Reply With Quote
 
 
 
 
Ken
Guest
Posts: n/a
 
      30th Jan 2007
Frank

Try Call Macro2 at the end of Macro1, or just Macro2 at the end of
Macro1.

Good luck.

Ken
Norfolk, Va


On Jan 30, 5:55 pm, Beep Beep <BeepB...@discussions.microsoft.com>
wrote:
> I have a number (7) of macros and would like to go to each one when the
> previous one is finished running. I forgot the vba command to put at the end
> of the macro to direct it to the next macro.
>
> Thanks
> Frank



 
Reply With Quote
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      30th Jan 2007
I would be more inclined to add a main calling procedure instead of chaining
the macros together. That way they stay as stand alone parts able to run
individually... Try something like this...

Sub RunAll ()
call Macro1
Call Macro2
Call Macro3
end sub

Sub Macro1()
msgbox "Macro1"
end sub

Sub Macro2()
msgbox "Macro2"
end sub

Sub Macro3()
msgbox "Macro3"
end sub

--
HTH...

Jim Thomlinson


"Beep Beep" wrote:

> I have a number (7) of macros and would like to go to each one when the
> previous one is finished running. I forgot the vba command to put at the end
> of the macro to direct it to the next macro.
>
> Thanks
> Frank

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      30th Jan 2007

sub macro1

blah

macro2
end sub

or put em together

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Beep Beep" <(E-Mail Removed)> wrote in message
news:E9A35F44-4130-4436-BE8D-(E-Mail Removed)...
>I have a number (7) of macros and would like to go to each one when the
> previous one is finished running. I forgot the vba command to put at the
> end
> of the macro to direct it to the next macro.
>
> Thanks
> Frank



 
Reply With Quote
 
=?Utf-8?B?QmVlcCBCZWVw?=
Guest
Posts: n/a
 
      31st Jan 2007
Thanks Ken.

Here is what I added to the end of macro Sub AptOneInvoice()

Sub AptOneInvoice() going through AptSevenInvoice()

I tried adding your suggestion but must be doing something wrong

Here is what I added:

Call .AptTwoInvoice only to get the message
Invalid or unqualified message.

Thanks
Frank

Here is what my macros are called.


"Ken" wrote:

> Frank
>
> Try Call Macro2 at the end of Macro1, or just Macro2 at the end of
> Macro1.
>
> Good luck.
>
> Ken
> Norfolk, Va
>
>
> On Jan 30, 5:55 pm, Beep Beep <BeepB...@discussions.microsoft.com>
> wrote:
> > I have a number (7) of macros and would like to go to each one when the
> > previous one is finished running. I forgot the vba command to put at the end
> > of the macro to direct it to the next macro.
> >
> > Thanks
> > Frank

>
>
>

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      31st Jan 2007
What's the . for?

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Beep Beep" <(E-Mail Removed)> wrote in message
news:6F3338B9-0328-459C-912C-(E-Mail Removed)...
> Thanks Ken.
>
> Here is what I added to the end of macro Sub AptOneInvoice()
>
> Sub AptOneInvoice() going through AptSevenInvoice()
>
> I tried adding your suggestion but must be doing something wrong
>
> Here is what I added:
>
> Call .AptTwoInvoice only to get the message
> Invalid or unqualified message.
>
> Thanks
> Frank
>
> Here is what my macros are called.
>
>
> "Ken" wrote:
>
>> Frank
>>
>> Try Call Macro2 at the end of Macro1, or just Macro2 at the end of
>> Macro1.
>>
>> Good luck.
>>
>> Ken
>> Norfolk, Va
>>
>>
>> On Jan 30, 5:55 pm, Beep Beep <BeepB...@discussions.microsoft.com>
>> wrote:
>> > I have a number (7) of macros and would like to go to each one when the
>> > previous one is finished running. I forgot the vba command to put at
>> > the end
>> > of the macro to direct it to the next macro.
>> >
>> > Thanks
>> > Frank

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?QmVlcCBCZWVw?=
Guest
Posts: n/a
 
      31st Jan 2007
Thanks Don

I took out the . and AptOneInvoice still runs fine, however it still does
not continue on to the next macro AptTwoInvoice

Thanks
Frank

"Don Guillett" wrote:

> What's the . for?
>
> --
> Don Guillett
> SalesAid Software
> (E-Mail Removed)
> "Beep Beep" <(E-Mail Removed)> wrote in message
> news:6F3338B9-0328-459C-912C-(E-Mail Removed)...
> > Thanks Ken.
> >
> > Here is what I added to the end of macro Sub AptOneInvoice()
> >
> > Sub AptOneInvoice() going through AptSevenInvoice()
> >
> > I tried adding your suggestion but must be doing something wrong
> >
> > Here is what I added:
> >
> > Call .AptTwoInvoice only to get the message
> > Invalid or unqualified message.
> >
> > Thanks
> > Frank
> >
> > Here is what my macros are called.
> >
> >
> > "Ken" wrote:
> >
> >> Frank
> >>
> >> Try Call Macro2 at the end of Macro1, or just Macro2 at the end of
> >> Macro1.
> >>
> >> Good luck.
> >>
> >> Ken
> >> Norfolk, Va
> >>
> >>
> >> On Jan 30, 5:55 pm, Beep Beep <BeepB...@discussions.microsoft.com>
> >> wrote:
> >> > I have a number (7) of macros and would like to go to each one when the
> >> > previous one is finished running. I forgot the vba command to put at
> >> > the end
> >> > of the macro to direct it to the next macro.
> >> >
> >> > Thanks
> >> > Frank
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
=?Utf-8?B?QmVlcCBCZWVw?=
Guest
Posts: n/a
 
      31st Jan 2007
Thanks Jim:

Here is what I got. The message I get is AptOneInvoice OK and so on for the
three of them. However it does not appear to run the actual individual
macros.

Thanks
Frank


' SubRun Macro
' Macro recorded 1/30/2007 by Frank

Sub RunAll()
Call AptOneInvoice
Call AptTwoInvoice
Call AptThreeInvoice
End Sub

Sub AptOneInvoice()
MsgBox "AptOneInvoice"
End Sub

Sub AptTwoInvoice()
MsgBox "AptTwoInvoice"
End Sub

Sub AptThreeInvoice()
MsgBox "AptThreeInvoice"
End Sub

"Jim Thomlinson" wrote:

> I would be more inclined to add a main calling procedure instead of chaining
> the macros together. That way they stay as stand alone parts able to run
> individually... Try something like this...
>
> Sub RunAll ()
> call Macro1
> Call Macro2
> Call Macro3
> end sub
>
> Sub Macro1()
> msgbox "Macro1"
> end sub
>
> Sub Macro2()
> msgbox "Macro2"
> end sub
>
> Sub Macro3()
> msgbox "Macro3"
> end sub
>
> --
> HTH...
>
> Jim Thomlinson
>
>
> "Beep Beep" wrote:
>
> > I have a number (7) of macros and would like to go to each one when the
> > previous one is finished running. I forgot the vba command to put at the end
> > of the macro to direct it to the next macro.
> >
> > Thanks
> > Frank

 
Reply With Quote
 
Alan
Guest
Posts: n/a
 
      31st Jan 2007
Hi Frank,

I would suggest creating a new macro to call your macros vs. calling one
from another. None of the macros would work stand alone without error except
Macro7 which doesn't call another macro. I would call them using something
like this:

Sub RunMacros()
Call Macro1
Call Macro2
Call Macro3
Call Macro4
Call Macro5
Call Macro6
Call Macro7
End Sub


Alan


"The only dumb question is a question left unasked."


"Beep Beep" <(E-Mail Removed)> wrote in message
news:E9A35F44-4130-4436-BE8D-(E-Mail Removed)...
>I have a number (7) of macros and would like to go to each one when the
> previous one is finished running. I forgot the vba command to put at the
> end
> of the macro to direct it to the next macro.
>
> Thanks
> Frank



 
Reply With Quote
 
=?Utf-8?B?Z2VyZG1haW4=?=
Guest
Posts: n/a
 
      31st Jan 2007
Hi,

It's a good start so far. I assume your actual macros are called
AptOneInvoice, etc. If this is the case, just delete the lines
Sub AptOneInvoice()
MsgBox "AptOneInvoice"
End Sub
Then run the macro RunAll again. If the real AptOneInvoice is now executed,
delete the other sub-routines below RunAll() as well.

But of course, if the macros are not called AptOneInvoice then you should
change the Call statements in RunAll accordingly.


--
Gerd


"Beep Beep" wrote:

> Thanks Jim:
>
> Here is what I got. The message I get is AptOneInvoice OK and so on for the
> three of them. However it does not appear to run the actual individual
> macros.
>
> Thanks
> Frank
>
>
> ' SubRun Macro
> ' Macro recorded 1/30/2007 by Frank
>
> Sub RunAll()
> Call AptOneInvoice
> Call AptTwoInvoice
> Call AptThreeInvoice
> End Sub
>
> Sub AptOneInvoice()
> MsgBox "AptOneInvoice"
> End Sub
>
> Sub AptTwoInvoice()
> MsgBox "AptTwoInvoice"
> End Sub
>
> Sub AptThreeInvoice()
> MsgBox "AptThreeInvoice"
> End Sub
>
> "Jim Thomlinson" wrote:
>
> > I would be more inclined to add a main calling procedure instead of chaining
> > the macros together. That way they stay as stand alone parts able to run
> > individually... Try something like this...
> >
> > Sub RunAll ()
> > call Macro1
> > Call Macro2
> > Call Macro3
> > end sub
> >
> > Sub Macro1()
> > msgbox "Macro1"
> > end sub
> >
> > Sub Macro2()
> > msgbox "Macro2"
> > end sub
> >
> > Sub Macro3()
> > msgbox "Macro3"
> > end sub
> >
> > --
> > HTH...
> >
> > Jim Thomlinson
> >
> >
> > "Beep Beep" wrote:
> >
> > > I have a number (7) of macros and would like to go to each one when the
> > > previous one is finished running. I forgot the vba command to put at the end
> > > of the macro to direct it to the next macro.
> > >
> > > Thanks
> > > Frank

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Continuous Subform within a Continuous Form - Possible? AR51NAL Microsoft Access Forms 2 23rd Jun 2009 12:19 PM
Selecting non-continuous records in a continuous form wvaughan Microsoft Access VBA Modules 2 3rd Jun 2008 12:29 PM
continuous reboot / continuous restart =?Utf-8?B?ZHZhbmR1c2Vu?= Microsoft Windows 2000 Applications 2 8th Jul 2007 04:09 PM
Continuous subform per continuous form element capkrugers@gmail.com Microsoft Access Forms 0 19th Jul 2006 07:10 PM
Concatenate records or Continuous Form within a continuous form Greg Hill Microsoft Access Form Coding 0 5th Sep 2003 08:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:23 AM.