bamaisgreat
Well-known Member
- Joined
- Jan 23, 2012
- Messages
- 831
- Office Version
- 365
- Platform
- Windows
Thanks for looking !
I have bits and pieces of code below to attempt this.The code is incomplete.
My Goal is:
When Data is entered into textbox1 and textbox2 that information will go to the last empty row in columns H and I (which is Dynamic Range "Operators") when clicking on command button 1 in the userform.
I have bits and pieces of code below to attempt this.The code is incomplete.
My Goal is:
When Data is entered into textbox1 and textbox2 that information will go to the last empty row in columns H and I (which is Dynamic Range "Operators") when clicking on command button 1 in the userform.
Code:
Private Sub CommandButton1_Click()
Dim adr As String
Range("Operators").Cells(1, 1).Offset(rws, 0).Value = UserForm5.TextBox1.Value
Range("Operators").Cells(1, 2).Offset(rws, 0).Value = UserForm5.TextBox2.Value
With Range("Operators").name
adr = .RefersTo
.Delete
End With
Range(adr).Resize(rws + 1, 1).name = "Operators"
Unload Me
End Sub