Thanks, guys. This gives me more to chew on.
Originally Posted by
mvidas
Hi Shades,
First off, I have no idea about vba on a mac. That being said, have you considered a userform with textboxes? Take a look at the following example, you specify the max length for each of the text boxes, and once that max length has been reached, it goes to the next textbox. After the last is filled out, it goes to the Done button, which when clicked populates those values in the specified cells. So your user only has to enter "12345<enter>" and a1 will get 1, b2 will get 2, c3 will get 3, etc.
Matt
I like this approach - I had originally thought about this, but had no idea where to go. Now, given what you have produced, This works for the first row, but what about next row? My thought was to do something like this:
Private Sub DoneButton_Click()
Dim i As Integer
Dim LastRow As Long
LastRow = InputBox("Number of Rows")
For i = 2 To LastRow
ThisWorkbook.ActiveSheet.Cells(2, 1) = TextBox1.Text
ThisWorkbook.ActiveSheet.Cells(2, 2) = TextBox2.Text
ThisWorkbook.ActiveSheet.Cells(2, 3) = TextBox3.Text
ThisWorkbook.ActiveSheet.Cells(2, 4) = TextBox4.Text
ThisWorkbook.ActiveSheet.Cells(2, 5) = TextBox5.Text
Next i
Unload Me
End Sub
[eidt: That's not the approach to the lastrow I want.... I am working on it ]
But this leaves a problem. I suppose it would be better to locate the next blank cell in Column A for the next series of entries?