Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Continuous Macros

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 207
Default Continuous Macros

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
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Continuous Macros

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Continuous Macros


sub macro1

blah

macro2
end sub

or put em together

--
Don Guillett
SalesAid Software

"Beep Beep" wrote in message
...
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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Continuous Macros

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
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






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Continuous Macros

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

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 116
Default Continuous Macros

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" wrote in message
...
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



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Continuous Macros

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



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Continuous Macros

Thanks Alan:
Unfortunately this did not work. Here is what I got:

Sub CallMacros()
'
' CallMacros Macro
' Macro recorded 2/1/2007 by Frank
'
Call AptOneInvoice
Call AptTwoInvoice
Call AptThreeInvoice
Call AptFourInvoice
Call AptFiveInvoice
Call AptSixInvoice
Call AptSevenInvoice
End Sub

"Alan" wrote:

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" wrote in message
...
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




  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Continuous Macros

Alan I forgot to add the message I got:

"Ambiguous Name Detected: AptOneInvoice

"Alan" wrote:

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" wrote in message
...
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




  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Continuous Macros

Thanks Everybody that has responded. I hate to amit it but I was using the
name of the file as opposed to the different names of the worksheets. Also
Don was correct in that I had two macros named the same. This happened
because I had opened another workbook that also had the same macro name and
it was seeing two. O well more to learn.

Thanks again
Frank

"Don Guillett" wrote:

That means that there are TWO of them.

--
Don Guillett
SalesAid Software

"Beep Beep" wrote in message
...
Alan I forgot to add the message I got:

"Ambiguous Name Detected: AptOneInvoice

"Alan" wrote:

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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
continuous typing FX Excel Discussion (Misc queries) 2 August 18th 07 07:22 PM
Continuous Loop John Coleman Excel Programming 1 December 22nd 06 03:11 PM
Continuous Refresh Huber57 Excel Discussion (Misc queries) 9 July 31st 06 08:29 PM
Continuous Range DSC174[_2_] Excel Programming 3 October 10th 05 05:17 PM
Printing continuous PierreL Excel Discussion (Misc queries) 3 August 26th 05 02:46 PM


All times are GMT +1. The time now is 10:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"