I've placed a checkbox in a userform. Instead of returning a value of True or False in the spreadsheet, I would like to change the response to Pass or Fail. Can anyone assist?
I've placed a checkbox in a userform. Instead of returning a value of True or False in the spreadsheet, I would like to change the response to Pass or Fail. Can anyone assist?
David
(*) Reputation points appreciated.
Yes, I would like to post the response in a spreadsheet.
Here is my code so far:
Private Sub cmdOK_Click() ActiveWorkbook.Sheets("QAData").Activate Range("A1").Select If txtPassword = "password" Then Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True ActiveCell.Value = txtCustomerName ActiveCell.Offset(0, 1) = txtProjectNumber.Value ActiveCell.Offset(0, 2) = txtProductType.Value ActiveCell.Offset(0, 3) = txtQtyManufactured.Value ActiveCell.Offset(0, 4) = txtQtyShipped.Value ActiveCell.Offset(0, 5) = txtInspectDate.Value ActiveCell.Offset(0, 6) = txtShipDate.Value ActiveCell.Offset(0, 7) = txtInspectedBy.Value ActiveCell.Offset(0, 8) = chkboxTSDelam1.Value Else MsgBox "Wrong password, please try again" End If Range("A1").Select End Sub Private Sub cmdClear_Click() Call UserForm_Initialize End Sub Private Sub UserForm_Initialize() txtCustomerName.Value = "" txtProjectNumber.Value = "" txtProductType.Value = "" txtQtyManufactured.Value = "" txtQtyShipped.Value = "" txtInspectDate.Value = "" txtShipDate.Value = "" txtInspectedBy.Value = "" chkboxTSDelam1.Value = "" txtCustomerName.SetFocus End Sub
Last edited by arlu1201; 07-31-2012 at 03:23 PM. Reason: Clarification
Melcoats,
Welcome to the Forum, unfortunately:
This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.
Thread Closed.
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks