Hey all. I'm relatively new to all this VBA coding stuff with Excel, and I'm hoping someone can help me out with my code for this counter I made. First of all, I'll tell you exactly what it's supposed to. The counter should appear on my userform (entitled RTVInfo). Everytime the command button "submit" is hit, the counter adds by 1.

The counter should also list that number it pertains to in a specific Excel cell. For instance, one user would open the form, input the data and then hit submit. The counter would go up to the number "2" on the form, and the data that was just entered goes into Excel with the A1 cell have the number one. Now another person would open the form, enter the information and hit submit and the counter on the form would go to 3 and and A2 would have the number "2" in it and so forth.

Here is my current code:

With Worksheets("RTVInfo")
.Range("A11") = .Range("A11") + 1
txtCounter = .Range("A11")
End With

Counter
lastsample = Sheets("RTVInfo").Cells(Rows.Count, "a").End(xlUp).Row
Sheets("RTVInfo").Cells(lastsample + 1, "a") = Sheets("RTVInfo").Cells(lastsample, "a") + 1
txtCounter.Value = Sheets("RTVInfo").Cells(lastsample, "a") + 1

The counter almost does what I want it to but not quite. The number 2 appears on the the A column correctly, but the data for the number 2 is one row below the actual number 2. As a result the data is skewed.

Anybody have any ideas?