Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 626
- Office Version
- 365
- 2010
- Platform
- Windows
Code:
[COLOR=#333333]Sub splitLot()[/COLOR]<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;">
i = 0
ansSplit = 0
ans = MsgBox("Is this a split Lot?", vbQuestion + vbYesNo, "Split Lot")
If ans = vbNo Then
frmPackageYield.Show vbModeless
Else
ansSplit = InputBox("How many times does this lot split?", "Split Lot")
For i = 1 To ansSplit
If i = 1 Then
frmPackageYield.Show vbModeless
ElseIf i > 1 Then
frmPackageYield.Show vbModeless
frmPackageYield.TxtBxBlkBlnd.Enabled = False
End If
Next i
End If
MsgBox "All Done"
</code>End Sub[COLOR=#222222][FONT=Verdana]
[/FONT][/COLOR]How can I make the above code to loop the form frmPackageYield a certain amount of times determined by ansSplit but on the second loop make certain text boxes disabled. Once all the looping is done display the message box. The problem that I am having is that it loops through so fast then displays the message box the same time the form is loaded for the first time. I hope this explanation makes sense.
Thank You