I am not sure if you are using a module or class modules, but this is what I would try first...
Public Sub intLoopCount as Integer Public Sub DetermineLoopCnt() Dim intResult 'You would enter your code here to determine the number of loops needed here and assign it to a variable. intResult = What your code determines. intLoopCount = intResult End Sub Public Sub DoScreenActions(ByVal LoopCount as Integer) Dim J as Integer J = 0 For J = 0 to LoopCount 'Enter your code for going through the screens here Next End Sub So in the actions of your rule within the step I would call DetermineLoopCnt first and then would go to the next line and run DoScreenActions(intLoopCount) right after. Garrett From: [email protected] [mailto:[email protected]] Sent: Thursday, August 06, 2009 12:13 PM To: [email protected] Subject: [talkbws] RE: Looping Steps Thanks for the reply. Yes, I do have a sub routine. Right now the sub routine determines the number of times to loop. Once I have that value(say 5), I have to do a set of actions(entering data into Meditech screen) 5 times. I am entering say, the same screens 5 times. So I created a Step to do this one time and I want to repeat the same 5 times. When you meant 'actions' can I put all the Rules in my Sub Routine? can you pls be a little specific?? thank you Ranjit M Bendapudi Meditech Service Center CSC 5209 Linbar Dr., Nashville, TN 37211 P: +1-615.662-7775 |direct: +1- 615.493.9070 |[email protected] | www.csc.com This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. [email protected] 08/06/2009 01:57 PM Please respond to [email protected] To [email protected] cc Subject [talkbws] RE: Looping Steps What about creating a Sub Procedure? There you can surround your actions with either a For...Next Loop or a Do...Until Loop and then all you have to do is call your procedure in the step that you need it in. Garrett S. O'Sullivan Project Assistant Regional Business Office 1235 NE 47th Avenue, Suite 110 Portland, Oregon 97213 Phone: 503.215.4462 Fax: 503.215.4343 Pager: 503.920.4560 [email protected] From: [email protected] [mailto:[email protected]] Sent: Thursday, August 06, 2009 11:55 AM To: [email protected] Subject: [talkbws] Looping Steps Hello all, Is there a way Loop a step? I am trying to do a set of actions in a Step. And this step has to be done 'n' times before it goes to next setp or record. For i=0 to 5 Step="Key Resources" next i thanks in advance. Ranjit M Bendapudi Meditech Service Center CSC 5209 Linbar Dr., Nashville, TN 37211 P: +1-615.662-7775 |direct: +1- 615.493.9070 |[email protected] | www.csc.com This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. --- To post a message to this list, send mail to: [email protected] You are currently subscribed as: [email protected] Unsubscribe in the customer center on our website: http://www.bostonworkstation.com/customer_center/virtual_user_group_talk .aspx DISCLAIMER: This message is intended for the sole use of the addressee, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the addressee you are hereby notified that you may not use, copy, disclose, or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete this message. --- To post a message to this list, send mail to: [email protected] You are currently subscribed as: [email protected] Unsubscribe in the customer center on our website: http://www.bostonworkstation.com/customer_center/virtual_user_group_talk .aspx --- To post a message to this list, send mail to: [email protected] You are currently subscribed as: [email protected] Unsubscribe in the customer center on our website: http://www.bostonworkstation.com/customer_center/virtual_user_group_talk .aspx DISCLAIMER: This message is intended for the sole use of the addressee, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the addressee you are hereby notified that you may not use, copy, disclose, or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete this message. --- To post a message to this list, send mail to: [email protected] You are currently subscribed as: [email protected] Unsubscribe in the customer center on our website: http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx
