curtryan45
New Member
- Joined
- Jun 6, 2008
- Messages
- 17
I currently have a userform with controls that has a submit button. It submits fine but it always goes into the active sheet (my starting sheet). I need it to go into a worksheet (ChangeData) in the same workbook. Here is the code I currently use
Private Sub btnSubmit_Click()
Worksheets("ChangeData").Range("B2").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = cboPhase.Value
ActiveCell.Offset(0, 1) = cboStep.Value
ActiveCell.Offset(0, 2) = txtTool.Value
ActiveCell.Offset(0, 3) = txtDesc.Value
ActiveCell.Offset(0, 4) = txtName.Value
End Sub
Find the next available row is already taken care of. Thanks
Private Sub btnSubmit_Click()
Worksheets("ChangeData").Range("B2").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = cboPhase.Value
ActiveCell.Offset(0, 1) = cboStep.Value
ActiveCell.Offset(0, 2) = txtTool.Value
ActiveCell.Offset(0, 3) = txtDesc.Value
ActiveCell.Offset(0, 4) = txtName.Value
End Sub
Find the next available row is already taken care of. Thanks