Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default step into process

sub macro1(sStr)
dim
if sStr < "" then
sStr = input box
End if
code
end sub


sub macro2()
Windows("test.xls").Activate
sStr = ""
Do
counter=counter+1
Application.Run "'test.xls'!macro1", sStr
loop until counter=10
end sub

or better

sub macro2()
Windows("test.xls").Activate
sStr = ""
sStr = Inputbox
Do
counter=counter+1
Application.Run "'test.xls'!macro1", sStr
loop until counter=10
end sub


Sub Macro1(sStr)
code you want to repeat
End Sub


--
Regards,
Tom Ogilvy

bob wrote in message
. ca...
i have macro1 with

sub macro1()
dim
input box
code
end sub

and macro2 that repeats macro1

sub macro2()
counter=counter+1
Windows("test.xls").Activate
Application.Run "'test.xls'!macro1"
if counter=
end if
end sub

how would i run all of macro1 the first time but jump to the code after
input box when repeating macro1 and keep using value from input box

string.
thanks




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
Creating a Drop Down List with Step by Step Instructions for 2007 remarkable Excel Worksheet Functions 2 March 22nd 09 05:36 AM
Need step by step to add invoice numbering to excel template rmt New Users to Excel 4 July 6th 08 11:45 PM
Can anyone povide step by step instructions on how to do the follo Daniel Bunt Excel Discussion (Misc queries) 6 January 26th 07 01:58 PM
What is the step-by-step procedure for making a data list? Bobgolfs56 Excel Discussion (Misc queries) 1 April 23rd 05 02:19 PM
I need step by step instructions to create a macro for 10 imbedde. diana Excel Worksheet Functions 3 January 31st 05 02:56 AM


All times are GMT +1. The time now is 01:59 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"