ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,251
- Office Version
- 2007
- Platform
- Windows
Evening.
When my userform opens i have two checkboxes.
CheckBox1 & Checkbox2
The user MUST select one of them to see another checkbox etc before pressing the command button which transfers the values to my worksheet.
Currently there is nothing in place to see if Checkbox 1 or CheckBox 2 was selected.
Please can you advise.
Thanks.
Here is the command button code.
When my userform opens i have two checkboxes.
CheckBox1 & Checkbox2
The user MUST select one of them to see another checkbox etc before pressing the command button which transfers the values to my worksheet.
Currently there is nothing in place to see if Checkbox 1 or CheckBox 2 was selected.
Please can you advise.
Thanks.
Here is the command button code.
Rich (BB code):
Private Sub TransferButton_Click()
With ThisWorkbook.Worksheets("RANGER")
If CheckBox3.Value = True Then .Cells(lastrow + 5, 9).Value = "N 41601-501-41": CheckBox3.Value = False
If CheckBox4.Value = True Then .Cells(lastrow + 5, 9).Value = "N 41803-501-42": CheckBox4.Value = False
If CheckBox5.Value = True Then .Cells(lastrow + 5, 9).Value = "V 41803-501-43": CheckBox5.Value = False
With .Range("I5")
.Font.Size = 14
.Font.Name = "Calibri"
.Font.Bold = True
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlVAlignCenter
End With
With Sheets("RANGER")
If .AutoFilterMode Then .AutoFilterMode = False
x = .Cells(.Rows.Count, 5).End(xlUp).Row
.Range("A4:I" & x).Sort Key1:=Range("B5"), Order1:=xlAscending, Header:=xlGuess
End With
Unload RangerPcbNumber
End With
MsgBox "DATABASE UPDATED SUCCESSFULLY", vbInformation, "SUCCESSFUL MESSAGE"
End Sub
Private Sub CheckBox1_Cha