I am trying to figure out how to keep the formulas in series in rows in the table, after inserting new row.
right now when inserting "new user" that row keeps formatting, but does not insert a formula.
example..
=IF(C9="","",C9+1095)
=IF(C10="","",C10+1095)
=IF(C11="","",C11+1095)
How could I acomplish this by inserting code into current code?
any help is appreciated.
Option Explicit
Dim LObj As ListObject
Private Sub Removeusernow_Click()
Dim i&
i = ComboBox1.ListIndex
If i = -1 Then MsgBox "Non-existent name: remove cancelled.": Exit Sub
ComboBox1.RowSource = ""
LObj.ListRows(1 + i).Delete
ComboBox1.RowSource = LObj.Name
Unload Me
End Sub
Private Sub UserForm_Initialize()
Set LObj = Range("Tabla1").ListObject
ComboBox1.RowSource = LObj.Name
End Sub
Private Sub Addusernow_Click()
Dim i&
i = ComboBox1.ListIndex
If i > -1 Then MsgBox "Existing name: addition cancelled.": Exit Sub
ComboBox1.RowSource = ""
If ComboBox1 < LObj.Range(2, 1) Then
LObj.ListRows.Add(1).Range(1) = ComboBox1
Else
i = WorksheetFunction.Match(ComboBox1, LObj.ListColumns(1).DataBodyRange)
If i < LObj.ListRows.Count Then
LObj.ListRows.Add(1 + i).Range(1) = ComboBox1
Else
LObj.ListRows.Add.Range(1) = ComboBox1
End If
End If
ComboBox1.RowSource = LObj.Name
Unload Me
End Sub
Certification.xlsm
Bookmarks