Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default How can I repeat a macro, and how can make it without any message?

Thanks for any helps
Emil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default How can I repeat a macro, and how can make it without any message?

Sub Macro1()

Dim i as Long

For i = 1 to 10
Macro2
Next

End Sub


Sub Macro2()

'run any code here

End Sub


RBS

"emil" wrote in message
...
Thanks for any helps
Emil


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default How can I repeat a macro, and how can make it without any message?

You might want to think about posting a more detailed question.


Sub Tester()
dim i as integer
application.displayalerts=false

for i=1 to 20
Macro1
next i

application.displayalerts=true

end sub

Sub Macro1()
'do stuff
End sub


--
Tim Williams
Palo Alto, CA


"emil" wrote in message ...
Thanks for any helps
Emil



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default How can I repeat a macro, and how can make it without any message?

Emil -

Without knowing more - here is a way:


Sub MyLoop
For c = 1 to 50
Call <insert your procedure name here
Next c
End Sub


This will run your code 50 times. Change the 50 above to 100 and it will
loop thru your code 100 times.

--
Thx
MSweetG222



"emil" wrote:

Thanks for any helps
Emil

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default How can I repeat a macro, and how can make it without any message?

Thank you very much for help.
It work
Emil

"emil" a scris:

Thanks for any helps
Emil



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default How can I repeat a macro, and how can make it without any mess

Milion thanks.
It work too
Emil

"RB Smissaert" a scris:

Sub Macro1()

Dim i as Long

For i = 1 to 10
Macro2
Next

End Sub


Sub Macro2()

'run any code here

End Sub


RBS

"emil" wrote in message
...
Thanks for any helps
Emil



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
How do I make sure I don't repeat a value in my worksheet? Abby Excel Programming 10 May 27th 09 01:41 PM
how do I make the first three rows repeat on top of every page? StardustDave New Users to Excel 2 January 29th 06 10:51 PM
Repeat Error message OkieViking Excel Programming 2 June 22nd 04 07:37 PM


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

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

About Us

"It's about Microsoft Excel"