do while command button property is false

O

oscar.c.marin

I cannot find a property for a command button on a UserForm so that I can use
as a trigger to stop or continue execution of the following code:

rSalesPerson.Value = " " & frmCreditReceipts.listNames.Text
rReceipt.Offset(counter, 0).Value = _
frmCreditReceipts.txtReceipt.Text
rAmount.Offset(counter, 0).Value = _
frmCreditReceipts.txtReceipt.Text
If frmCreditReceipts.listPayType.Text = "cheque" Then
rCheck.Text = frmCreditReceipts.txtAmount.Value
ElseIf frmCreditReceipts.listPayType.Text = "transfer"
Then
rTransfer.Text = frmCreditReceipts.txtAmount.Value
ElseIf frmCreditReceipts.listNames.Text = "efectivo" Then
rCash.Text = frmCreditReceipts.txtAmount.Value
ElseIf frmCreditReceipts.listPayType.Text = "nulo" Then
rNulified.Text = "NULO"
End If
frmCreditReceipts.txtReceipt.Value = ""
frmCreditReceipts.txtAmount.Value = ""
frmCreditReceipts.txtAmount.SetFocus
counter = counter + 1

I need the COUNTER to use as part of the Offset() property to enter the
value of textboxes in a Worksheet.

Thank you in advance for any ideas.
 
R

Rick Rothstein

Where is the code you posted located... in the Click event of the
CommandButton or somewhere else?
 
O

oscar.c.marin

Rick Rothstein said:
Where is the code you posted located... in the Click event of the
CommandButton or somewhere else?

CORRECT : Private Sub cmmdIngresar_Click(). I want the user to press the
cmmdIngresar ("Enter") command button, and by doing so, entering data in a
worksheet, while he/she has not pressed the Exit command button. I assume the
"value" of the command button Exti will be "False" or "0" before it is
pressed though I didn't find that property.
 
Top