Need help inserting data into certain worksheet from UserForm

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
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
it looks like it should work but maybe try replacing ActiveCell with Selection
 
Upvote 0
I figured it out, for some reason it worked when I changed Worksheets to Sheets separated Sheets.Select and Range.Select
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top