Enter userform data into cell and then move down one row

bturnbow

New Member
Joined
Nov 15, 2022
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hello, I'm very new to VBA and I'm trying to work through a project but have gotten stuck.

I'm trying to have a comment entered into cell I13 and then any subsequent comments to be entered in the row below and so on.

So far this is what I have, but it stops working after the second comment has been entered. If I try to enter a 3rd comment nothing happens after hitting confirm. I'm guessing it has something to do with the merged cells.

Thank you

VBA Code:
Private Sub cmdConfirm_Click()

'Sheets("Production Report").Unprotect Password:="abc"
Dim I As Long

Sheets("Production Report").Activate
ActiveSheet.Range("I13").Activate

Do While IsEmpty(ActiveCell.Offset(I, 0)) = False
    I = I + 1
Loop

ActiveCell.Offset(I, 0).Value = txtProduct.Value

'Sheets("Production Report").Protect password:="abc"
    Unload Me
End Sub

Screenshot 2022-11-15 160356.png
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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