How I can add a new sheet in the excel workbook if I add a new row in the table? Please help me? I am trying this code. If Table 2 resizes ( adding a row) then new sheet otherwise message box.
Sub Message_box()
ActiveSheet.ShowDataForm
Dim myif As String
myif = ActiveSheet.ListObjects("Table2").ResizeRange
If myif = "true" Then
Sheets("Sample Table").Select
Cells.Select
Selection.Copy
Sheets("All Loans").Select
Sheets.Add After:=ActiveSheet
Cells.Select
ActiveSheet.Paste
Range("A1").Select
Else
MsgBox "Please, add loan detail in Form?"
End If
End Sub