hello
I have this code will add new sheets with the same formatting , borders also brings values from specific column , but doesn't copy the buttons with the macros to run the same macros for each new added sheet . what's the procedure to do that?
I have this code will add new sheets with the same formatting , borders also brings values from specific column , but doesn't copy the buttons with the macros to run the same macros for each new added sheet . what's the procedure to do that?
VBA Code:
Sub new_report()
Dim a
Sheets(Sheets.Count).Copy After:=Sheets(Sheets.Count)
With ActiveSheet.Cells(1).CurrentRegion.Offset(1)
ActiveSheet.Name = "report" & Sheets.Count - 1
a = .Value
.ClearContents
Cells(2, 1).Resize(UBound(a), 3) = Application.Index(a, Evaluate("row(1:" & UBound(a) & ")"), Array(1, 2, 6))
End With
End Sub