do while command button property is false

  • Thread starter Thread starter oscar.c.marin
  • Start date Start date
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.
 
Where is the code you posted located... in the Click event of the
CommandButton or somewhere else?
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

How to hide password? 1
Help with better loop code 1
Troube defining variable 2
Do Until or For Loop 3
code help 0
Counter stops working 4
String search 1
Message box causing error in code 6

Back
Top