Ok, so I’ve created a User Form in VBA. When this is filled out, and they hit the enter button, I want the info they entered to automatically be entered into a new worksheet within the document.
Here’s the formula I currently have:
Private Sub CommandButton1_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheet(”Sheet1″)
‘find first empty row in worksheet
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row
‘find second empty column in worksheet
iColumn = ws.Cells(Columns.Count, 1) _
.End(xlUp).Offset(2, 0).Column
‘copy the data in to the worksheet
ws.Range(”A1″).Value = Me.ComboBox1.Value
ws.Range(”A2″).Value = Me.ComboBox2.Value
End Sub
I’ve put break points in and it doesn’t seem to like any of it!
Please help if you can, or give suggetions!! Thank you
This website has a really good explanation of creating a form in VBA (http://exceltip.com/st/Create_User_Forms…
You’ll see that is much the same as VB forms.
The only thing is a table (by which I assume you mean rows and columns) would be a little big to show in one label within a form. You would have to embedded end of line characters in the middle.
Perhaps a list control would be better?
Anyway, hope this is useful to you.
the user determines should be discontinued. I have this code, but I now I what to take all highlighted items and copy.selection them into a separate list in another worksheet. What is the code in order to do this? I know that I need a counter, but I am having trouble figuring this out. Any help is appreciated. thanks.